Skip to main content

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.

Metadata

Release files for torch-structure-manipulation 0.6.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 torch-structure-manipulation 0.6.0
File Size Uploaded Provenance Actions
torch_structure_manipulation-0.6.0.tar.gz 18.2 kB With provenance Details for torch_structure_manipulation-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for torch-structure-manipulation 0.6.0
File Interpreter ABI Platform Actions
torch_structure_manipulation-0.6.0-py3-none-any.whl Python 3 none any Details for torch_structure_manipulation-0.6.0-py3-none-any.whl

Total release size: 36.6 kB

Release files / torch_structure_manipulation-0.6.0.tar.gz

Download URL torch_structure_manipulation-0.6.0.tar.gz
Size 18.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b49dbdb6d69fcbce354ddb2c168b2c420ce16d9c9ec3ad77333fe5363d1b9af6
BLAKE2b-256 checksum
How to use checksums
27f2229ba2fee850c44c53f579f066437152f22510c32013715db6664e855cc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 11, 2026.

Transparency log

Release files / torch_structure_manipulation-0.6.0-py3-none-any.whl

Download URL torch_structure_manipulation-0.6.0-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
70300bb7c2f1d0b96e9ba6a8fa8912bcea7c7e7e15737388d17bf1abffbfe462
BLAKE2b-256 checksum
How to use checksums
002d6917d0bf1e9ee85bb75722f880b74a793522a1adcae3552cd93a3a23f392
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 11, 2026.

Transparency log

Security for torch-structure-manipulation 0.6.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for torch_structure_manipulation-0.6.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 Sep 11, 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