Skip to main content

PydSEAMSlib

Open in Colab

pydseams

built with nix

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

Install the PyPI distribution pydseamslib and import pydseams. Frame is the entry point for structures from trajectories, arrays, and ASE. The package also provides trajectory analysis functions.

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
python -m pip install 'pydseamslib[ase]'      # ASE Atoms
python -m pip install 'pydseamslib[solvis]'   # solvis / PyVista

Each wheel bundles the d-SEAMS engine and installs the pydseams package.

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.parse_site_spec("1=polar,2=apolar")
print(mixed.domain(sites, ds.SiteKind.polar))

ions = ds.parse_site_spec("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. 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 pydseams as ds

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]
frame = ds.Frame.from_arrays(xyz, [a, a, a])
assert frame.chill_plus().cubic == 8

Migrating Python code

Existing code Public call
import pydseamslib import pydseams
dseams.Frame().set_frame(xyz, box) pydseams.Frame.from_arrays(xyz, box)
dseams.userframe.read(path) pydseams.read(path)
dseams.hbond_lifetime(...) pydseams.hbond_lifetime(...)
dseams.unwrap_positions(...) pydseams.unwrap_positions(...)

See the Python tutorial index for worked examples, including periodic Voronoi cells and hydrogen-bond lifetimes.

Development

The engine is seams-core, a Meson subproject here. subprojects/seams-core.wrap pins tag v2.15.0, 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.16.0

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.16.0
File Size Uploaded Provenance Actions
pydseamslib-2.16.0.tar.gz 15.2 MB With provenance Details for pydseamslib-2.16.0.tar.gz

Built distributions (wheels)

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

Total release size: 162.3 MB

Release files / pydseamslib-2.16.0.tar.gz

Download URL pydseamslib-2.16.0.tar.gz
Size 15.2 MB
Tags Source
SHA-256 checksum
How to use checksums
bad43002455f3455d3aa72220452238c2872f374341d6b77ba017e2f34ac6a9b
BLAKE2b-256 checksum
How to use checksums
8611d5a4cd48ced13da0bde43e3460740c19519efa759fba4e46f755845ef7fe
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 Dec 1, 2026.

Transparency log

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

Download URL pydseamslib-2.16.0-cp312-abi3-manylinux_2_28_x86_64.whl
Size 23.9 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
8e3b3dc44525d64c37558f04bb3ad793130c194dfa7cf15dfddc49f7cffecc4f
BLAKE2b-256 checksum
How to use checksums
f00cb3470db6d3ac5935f42ffb04351072b4b47d114da3043edcf5526593ae1d
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 Dec 1, 2026.

Transparency log

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

Download URL pydseamslib-2.16.0-cp312-abi3-manylinux_2_28_aarch64.whl
Size 21.4 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
19209c4f75a61139b927587cd3f9db8cfd7b553acf6df8dcbb7fc106abab6fae
BLAKE2b-256 checksum
How to use checksums
c503b6197dcb6a2cc06397ec56d301f3001c2c420f133478511de9cb07f6aed6
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 Dec 1, 2026.

Transparency log

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

Download URL pydseamslib-2.16.0-cp312-abi3-macosx_14_0_x86_64.whl
Size 15.3 MB
Tags CPython 3.12 abi3 macOS 14.0+ x86-64
SHA-256 checksum
How to use checksums
57946e0ddf2256e5c82e2fe4ac77508476b95dbd1a04802d7b0edeae5d31edc3
BLAKE2b-256 checksum
How to use checksums
92cf13f166e7bbddd1532cc5871f94c2ee354d2d8eea1a819e9511723820c878
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 Dec 1, 2026.

Transparency log

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

Download URL pydseamslib-2.16.0-cp312-abi3-macosx_14_0_arm64.whl
Size 12.9 MB
Tags CPython 3.12 abi3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
f42153ffb41da0163df6ee445ed683d8e22efaaf99ecc47577521921efe45be0
BLAKE2b-256 checksum
How to use checksums
e0cc152f03f2577e30884404f1bb91a441b59f8664dd3bcbd1fb4253bb013b42
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 Dec 1, 2026.

Transparency log

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

Download URL pydseamslib-2.16.0-cp311-cp311-manylinux_2_28_x86_64.whl
Size 23.9 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
4c4c0f77843dca9c6df8a2eb8fd34e1f63c95c5c7a992fb9f81f78dfe92d17cd
BLAKE2b-256 checksum
How to use checksums
165a9efd31e2ed44640e9a1270bac53361e0407a828351c7413660ed1d529a8d
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 Dec 1, 2026.

Transparency log

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

Download URL pydseamslib-2.16.0-cp311-cp311-manylinux_2_28_aarch64.whl
Size 21.5 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
2bb35daf8213f61685514c58053bb37ac642923c0d69102587b5236cd0254782
BLAKE2b-256 checksum
How to use checksums
9157dc0baacb721cd12287ce96e9ec9dce2a552cf896b5e26b6d7419457e897e
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 Dec 1, 2026.

Transparency log

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

Download URL pydseamslib-2.16.0-cp311-cp311-macosx_14_0_x86_64.whl
Size 15.3 MB
Tags CPython 3.11 macOS 14.0+ x86-64
SHA-256 checksum
How to use checksums
3c3342245202dffea76609cf02343fff3d8bb9d74db25e7d8920371d4707b121
BLAKE2b-256 checksum
How to use checksums
c6f2a62353a1ec5613ca2a081d2d8d8ef515e01317b34a315b8b209ecad07c7d
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 Dec 1, 2026.

Transparency log

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

Download URL pydseamslib-2.16.0-cp311-cp311-macosx_14_0_arm64.whl
Size 12.9 MB
Tags CPython 3.11 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
4ad26588c331d3e51db947e89a6aeb29b1ce7598c2fd299769a83f4831625fcc
BLAKE2b-256 checksum
How to use checksums
b22cd1fc1efcf800288c05e53831b272fe029a17e0f76eaa426af73c85163ef8
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 Dec 1, 2026.

Transparency log

Security for pydseamslib 2.16.0

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.16.0.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 Dec 1, 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