Skip to main content

PydSEAMSlib

Open in Colab

pydseams

built with nix

Python bindings for the d-SEAMS C++ engine (seams-core).

This repository builds the PyPI distribution pydseamslib. One wheel holds three import names over the same engine:

Import What it is
pydseams The Frame package: read, from_ase, features, band, solvis, and the compiled pydseams.yoda surface over libyodaLib
pydseamslib Re-exports pydseams (pydseamslib.Frame is pydseams.Frame)
dseams The 2.14 API over the stable C API (seams.h): chill_plus, q4q6, neighbours, rings, cages, symmetry, dseams.Frame, and dseams.userframe

The C++ engine and seams CLI live in seams-core, built here as a Meson subproject; libseams and libseams_lang ship inside the wheel. src/seams is the ctypes package over libseams (not in the wheel). Lua/Fennel is dseams in yodaStruct. Neighbour search is linkcell. Do not grow a second engine here.

Released versions live in CHANGELOG.md (Keep a Changelog). Unreleased notes are files under changelog.d/. The cut is towncrier build --version X.Y.Z.

python -m pip install 'pydseamslib==2.14.3'
python -m pip install 'pydseamslib[ase]==2.14.3'      # ASE Atoms
python -m pip install 'pydseamslib[solvis]==2.14.3'   # solvis / PyVista

Each command installs a wheel containing the bundled engine and all three import names: dseams, pydseams, and pydseamslib. No separate seams-core installation is needed.

Nix flake:

nix build
nix develop

Docs: docs/orgmode/ (ox-rst) and docs/source/ (Shibuya). Site: https://python.dseams.info/.

Book: Python and the Python Frame reference in the d-SEAMS book. Video: pydseams walkthrough on Odysee.

import pydseams as ds

frame = ds.read(
    "water.lammpstrj"
)  # release wheels also read .xyz, .con, .pdb, .gro, and .dcd
print(frame.chill_plus())
print(frame.cages())
print(frame.density(bins=100, axis="z"))

mixed = ds.read("ions.lammpstrj", all_atoms=True, atom_type=1)
sites = ds.yoda.parseSiteSpec("1=polar,2=apolar")
print(mixed.domain(sites, ds.yoda.Kind.polar))

ions = ds.yoda.parseSiteSpec("1=cationHead,2=anion")
print(mixed.pairs(ions))

frame = ds.from_ase(atoms)
atoms = frame.to_ase()
system = frame.to_solvis()  # optional extra

ds.read picks the engine reader from the suffix. yoda is the compiled surface. Helpers (Frame, io, ASE, solvis) stay in Python. _core and cyoda still name the same module. ds.available_readers() reports the readers compiled into a wheel. The 2.14.3 PyPI wheels link chemfiles and readcon-core, so .pdb, .gro, .dcd, and eOn .con all read directly next to LAMMPS and .xyz. Only a source build left on the default auto detection, with one of those libraries unavailable, raises RuntimeError for the suffixes that library would have read.

Frame.density, Frame.pairs, and Frame.domain expose the same site-resolved density, ion-pair, and connected-domain analyses as the CLI. Use ds.read(..., all_atoms=True) when a site analysis needs every LAMMPS type. A file with more than one element symbol gives each symbol its own c_type, and the cutoff graph contains like and unlike pairs. Pass periodic=False for a molecule so pairs are not wrapped across the bounding span. atom_type is the species single-type ice routines still receive. pydseams.band.band_rows names the pairs that enter or leave that graph from one frame to the next. ASE adapters accept nonsingular cells periodic in all three directions and preserve cell orientation and displacement on roundtrip. Hydrogen donors use an ASE mol-id array when present and periodic nearest-atom ownership otherwise. All-atom ASE imports (select=None) use cutoff bonding; hydrogen-bond topology requires a heavy-atom selection such as select="O".

Cutoff, frame, and k follow the same twelve-factor table as seams: SEAMS_CONFIG or ./seams.env, then the environment, then the function argument. pydseams.config is the reader.

import dseams

a = 2.75 * 4 / 3**0.5
sites = (
    (0, 0, 0),
    (0.5, 0.5, 0),
    (0.5, 0, 0.5),
    (0, 0.5, 0.5),
    (0.25, 0.25, 0.25),
    (0.75, 0.75, 0.25),
    (0.75, 0.25, 0.75),
    (0.25, 0.75, 0.75),
)
xyz = [[x * a, y * a, z * a] for x, y, z in sites]
assert dseams.chill_plus(xyz, [a, a, a])[1][0] == 8

dseams reads C-contiguous NumPy arrays in place. box is three edge lengths or the nine LAMMPS numbers ox, oy, oz, lx, ly, lz, xy, xz, yz. cages, signature_cages, and symmetry go through libseams_lang.

Upgrading from 2.11

  • import pydseams and import pydseamslib keep the 2.11 API, including pydseams.yoda, cyoda, and _core.
  • CHILL+ on a cutoff list follows the seams-core 2.14 shell-count fix. On tests/data/exampleTraj.lammpstrj (oxygen, type 2) Frame.chill_plus() reports 9 interClathrate and 241 water, where 2.11 reported 12 and 238.
  • FrameFingerprint and KeyLibrary also expose colored; coloured still works.
  • dseams is new. dseams.userframe.Frame is a second Frame over libseams_lang with a graph argument on chill_plus; it is not pydseams.Frame.

Development

The engine is seams-core, a Meson subproject here. subprojects/seams-core.wrap pins tag v2.14.3, and the other wraps carry the revisions that tag pins. Engine changes go to d-SEAMS/seams-core, not to this repository. The contributing guide at the repository root has the layout, the test commands and the commit conventions.

The build needs a C++20 compiler and cargo with Rust 1.88 or newer (linkcell, minimage and readcon are Rust crates; readcon-core and readcon-db declare rust-version = "1.88"). Installing the sdist builds the same tree, so it needs them too:

meson setup bbdir --force-fallback-for=eigen3
meson compile -C bbdir
meson test -C bbdir --suite pydseamslib

To build against a local seams-core checkout, put it where the wrap would: Meson uses an existing subprojects/seams-core directory and does not fetch the pinned revision.

ln -s /path/to/seams-core subprojects/seams-core
meson setup --wipe bbdir --force-fallback-for=eigen3

The tests that read seams-core inputs (input/traj/...) take them from SEAMS_CORE_SRC, else subprojects/seams-core.

The release path is docs/orgmode/contributing/developer/release.org.

llms.txt at the repository root, also served at the docs site root, lists the documentation pages.

Primary author: Ruhila S (https://orcid.org/0000-0002-5443-9356). The project started as PSF GSoC 2023 (pyseams).

Requires Python 3.11+. CPython 3.11 has a version-specific wheel. Python 3.12 and newer use the CPython 3.12 stable ABI (one abi3 wheel per platform). Free-threaded CPython has no limited ABI and is not a target.

License

MIT.

Install the readcon extra to stream labelled trajectory frames. Coordinate-only formats such as XTC and TRR require a topology with matching atom order.

from pydseams import iter_trajectory

for frame in iter_trajectory(
    "water.xtc",
    topology="water.gro",
    residue_name="SOL",
    atom_name="OW",
    hydrogen_names=("HW1", "HW2"),
):
    print(frame.frame, len(frame.rings))

Metadata

Release files for pydseamslib 2.14.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydseamslib 2.14.3
File Size Uploaded Provenance Actions
pydseamslib-2.14.3.tar.gz 14.5 MB With provenance Details for pydseamslib-2.14.3.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pydseamslib 2.14.3
File Actions
pydseamslib-2.14.3-cp312-abi3-manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-64 Details for pydseamslib-2.14.3-cp312-abi3-manylinux_2_28_x86_64.whl
pydseamslib-2.14.3-cp312-abi3-manylinux_2_28_aarch64.whl CPython 3.12 abi3 Linux glibc 2.28+ ARM64 Details for pydseamslib-2.14.3-cp312-abi3-manylinux_2_28_aarch64.whl
pydseamslib-2.14.3-cp312-abi3-macosx_14_0_x86_64.whl CPython 3.12 abi3 macOS 14.0+ x86-64 Details for pydseamslib-2.14.3-cp312-abi3-macosx_14_0_x86_64.whl
pydseamslib-2.14.3-cp312-abi3-macosx_14_0_arm64.whl CPython 3.12 abi3 macOS 14.0+ ARM64 Details for pydseamslib-2.14.3-cp312-abi3-macosx_14_0_arm64.whl
pydseamslib-2.14.3-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details for pydseamslib-2.14.3-cp311-cp311-manylinux_2_28_x86_64.whl
pydseamslib-2.14.3-cp311-cp311-manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64 Details for pydseamslib-2.14.3-cp311-cp311-manylinux_2_28_aarch64.whl
pydseamslib-2.14.3-cp311-cp311-macosx_14_0_x86_64.whl CPython 3.11 CPython 3.11 macOS 14.0+ x86-64 Details for pydseamslib-2.14.3-cp311-cp311-macosx_14_0_x86_64.whl
pydseamslib-2.14.3-cp311-cp311-macosx_14_0_arm64.whl CPython 3.11 CPython 3.11 macOS 14.0+ ARM64 Details for pydseamslib-2.14.3-cp311-cp311-macosx_14_0_arm64.whl

Total release size: 148.7 MB

Release files / pydseamslib-2.14.3.tar.gz

Download URL pydseamslib-2.14.3.tar.gz
Size 14.5 MB
Tags Source
SHA-256 checksum
How to use checksums
767fea0eb1619a3c57507a28bde63417967b9f09f543c8533838f95f5d2f962d
BLAKE2b-256 checksum
How to use checksums
164a5d0266fff54eb9b3a174c468de61cd5f681384cb44feb7e9323aab46a725
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / pydseamslib-2.14.3-cp312-abi3-manylinux_2_28_x86_64.whl

Download URL pydseamslib-2.14.3-cp312-abi3-manylinux_2_28_x86_64.whl
Size 22.5 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
b8ef12a44f673936582ad7dfcb3e01c26e730505f983354ac29602cfeb323dba
BLAKE2b-256 checksum
How to use checksums
9bdb9b6b5c5bb04b1f8759d586f17042cb97b8362ddee09351b96ca9698a63c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / pydseamslib-2.14.3-cp312-abi3-manylinux_2_28_aarch64.whl

Download URL pydseamslib-2.14.3-cp312-abi3-manylinux_2_28_aarch64.whl
Size 20.1 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
6e4d215961d3e60d932eaa4cba70a56eca76ddcdbe660f1d875449ca25285bb6
BLAKE2b-256 checksum
How to use checksums
9358d1a97cce8c6fe43e689e94c79034d19bde91c0c9dd12e1949b837ef42389
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / pydseamslib-2.14.3-cp312-abi3-macosx_14_0_x86_64.whl

Download URL pydseamslib-2.14.3-cp312-abi3-macosx_14_0_x86_64.whl
Size 13.2 MB
Tags CPython 3.12 abi3 macOS 14.0+ x86-64
SHA-256 checksum
How to use checksums
69898e8b0155f729778ea3e91185083ec7d6d6558be7c9383040d6e88675b553
BLAKE2b-256 checksum
How to use checksums
b746909ceae6827d36576270bef7e232fd734cf311f27daffb5b86c41a95fddf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / pydseamslib-2.14.3-cp312-abi3-macosx_14_0_arm64.whl

Download URL pydseamslib-2.14.3-cp312-abi3-macosx_14_0_arm64.whl
Size 11.1 MB
Tags CPython 3.12 abi3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
32b371df2608b6ed03e346d00d5bddf052ab81e35201603a7bc115e01c9aa81b
BLAKE2b-256 checksum
How to use checksums
be5d52220c1f9ea4b0a8e4bbb4a4a74a2d70084ce2467a779b2ec35d8db38457
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / pydseamslib-2.14.3-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL pydseamslib-2.14.3-cp311-cp311-manylinux_2_28_x86_64.whl
Size 22.5 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
966ba686d5d67061e9c8f887f489b495b7cf07fd619d5fdbf513717dfa8e590f
BLAKE2b-256 checksum
How to use checksums
b0c4c14498b5aed038617f10b594c9f2f9c17af5cb3b14924d30d1aa8db493bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / pydseamslib-2.14.3-cp311-cp311-manylinux_2_28_aarch64.whl

Download URL pydseamslib-2.14.3-cp311-cp311-manylinux_2_28_aarch64.whl
Size 20.1 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
6f7bec2a57f366f9d36ece1d9b04640f48b763f608e05038da8aa482567f503f
BLAKE2b-256 checksum
How to use checksums
b8137e96bbae214d31e96ee741bcd16612dcd75c550b6b345f3ece2923804492
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / pydseamslib-2.14.3-cp311-cp311-macosx_14_0_x86_64.whl

Download URL pydseamslib-2.14.3-cp311-cp311-macosx_14_0_x86_64.whl
Size 13.2 MB
Tags CPython 3.11 macOS 14.0+ x86-64
SHA-256 checksum
How to use checksums
29bed2b692ca6c25257bb39f882a66df2e40fe0bfef7d7945a8095d80c6a82ed
BLAKE2b-256 checksum
How to use checksums
af74c32c318587ab2ad6d952f69ad7601de5181129a5f8c2e6674e3512bca6b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / pydseamslib-2.14.3-cp311-cp311-macosx_14_0_arm64.whl

Download URL pydseamslib-2.14.3-cp311-cp311-macosx_14_0_arm64.whl
Size 11.2 MB
Tags CPython 3.11 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
5df95f33fde28cab83b7636e4a815cf88819c08c8f7d24a2a2285f13a11f72d8
BLAKE2b-256 checksum
How to use checksums
d7045e0c3656b5ed115796e0020e377bf934e1432e7df4fd1dd91fe19589b526
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Security for pydseamslib 2.14.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 9 files in this release have been uploaded with provenance metadata.

Select from 9 files

Attestation for pydseamslib-2.14.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page