Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

torch-structure-manipulation

Typed, in-memory utilities for atomic structures:

  • AtomicStructure.from_dataframe converts mmdf-compatible DataFrames into device-aware tensors, with positions stored in (z, y, x) array order.
  • AtomicStructure.from_annotated_dataframe annotates bonding metadata and then constructs the structure in one step.
  • annotate_bonding_environments adds template-derived bonding and protein/rna/other molecule annotations without reading files.
  • classify_structure_composition and get_scattering_provider_keys expose aggregate composition labels and per-atom Peng provider keys respectively.
  • Centering, rotation, translation, atom selection, and coordinate conversion helpers are re-exported from the package root (also available under structure_transforms).
import mmdf

from torch_structure_manipulation import (
    AtomicStructure,
    annotate_bonding_environments,
    center_structure,
)

# File I/O belongs to the caller; mmdf is not a runtime dependency.
atoms = mmdf.read("structure.cif")
structure = AtomicStructure.from_annotated_dataframe(atoms, include_hydrogens=False)

# Or annotate first when you still need the DataFrame:
annotated = annotate_bonding_environments(atoms)
centered = center_structure(annotated, center_point=(0.0, 0.0, 0.0), zyx=False)
structure = AtomicStructure.from_dataframe(centered)

License

This project is licensed under the BSD 3-Clause License; see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torch_structure_manipulation-0.6.0rc1.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

torch_structure_manipulation-0.6.0rc1-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file torch_structure_manipulation-0.6.0rc1.tar.gz.

File metadata

File hashes

Hashes for torch_structure_manipulation-0.6.0rc1.tar.gz
Algorithm Hash digest
SHA256 5f130bc60cd42013e0337e0aa2e2a5959f6aa7ca74d26e6bdfdfca4c981a475b
MD5 9e6a5e3f530cf0f336d494de4d3c9125
BLAKE2b-256 4d9a702e2e953af4bcb06bc70bd1319dc5855be7ddb49d9d816d3d9bc909b9d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_structure_manipulation-0.6.0rc1.tar.gz:

Publisher: deploy.yml on teamtomo/teamtomo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_structure_manipulation-0.6.0rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for torch_structure_manipulation-0.6.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 6e6388f273702f89d1c82ef58663b792651554688ede3d3901ead174a4c37d64
MD5 94d959e191f9faad24cc68463eb5b288
BLAKE2b-256 079690596a72360d5943b1f09911a56b8d4465b390ea88f1a3110b49460b54ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_structure_manipulation-0.6.0rc1-py3-none-any.whl:

Publisher: deploy.yml on teamtomo/teamtomo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.6.0

2 files

This release

0.6.0rc1 This release

2 files

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