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.0rc2.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.0rc2-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for torch_structure_manipulation-0.6.0rc2.tar.gz
Algorithm Hash digest
SHA256 d9c1f08dc1158beadce3d9a1b8098b5ca057dd22268dae2fa123293cb3d1aee5
MD5 66927b7cbfa0f941fafd5f5fcb3b4a51
BLAKE2b-256 4391ddf873e9f8fddf657b16461610fe9b6ad62b831cbb933e96fc59f50ed98e

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_structure_manipulation-0.6.0rc2.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.0rc2-py3-none-any.whl.

File metadata

File hashes

Hashes for torch_structure_manipulation-0.6.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 2894db2e3542010f58f893d21680217445c943078a15d2b57c17e75bad98bb6b
MD5 7d135eece3929c2d7ec08cbfd6f71710
BLAKE2b-256 8ec7d4f83c8ddca22921ead2ca08343d83279f6de022205d3df59d4aa37a3149

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_structure_manipulation-0.6.0rc2-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.0rc2 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