torch-structure-manipulation
Typed, in-memory utilities for atomic structures:
AtomicStructure.from_dataframeconverts mmdf-compatible DataFrames into device-aware tensors, with positions stored in(z, y, x)array order.AtomicStructure.from_annotated_dataframeannotates bonding metadata and then constructs the structure in one step.annotate_bonding_environmentsadds template-derived bonding andprotein/rna/othermolecule annotations without reading files.classify_structure_compositionandget_scattering_provider_keysexpose 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file torch_structure_manipulation-0.6.0.tar.gz.
File metadata
- Download URL: torch_structure_manipulation-0.6.0.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b49dbdb6d69fcbce354ddb2c168b2c420ce16d9c9ec3ad77333fe5363d1b9af6
|
|
| MD5 |
a411bddba5d582bf5bfd4676e920a542
|
|
| BLAKE2b-256 |
27f2229ba2fee850c44c53f579f066437152f22510c32013715db6664e855cc8
|
Provenance
The following attestation bundles were made for torch_structure_manipulation-0.6.0.tar.gz:
Publisher:
deploy.yml on teamtomo/teamtomo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torch_structure_manipulation-0.6.0.tar.gz -
Subject digest:
b49dbdb6d69fcbce354ddb2c168b2c420ce16d9c9ec3ad77333fe5363d1b9af6 - Sigstore transparency entry: 2798489619
- Sigstore integration time:
-
Permalink:
teamtomo/teamtomo@181e7dd30d6548fa65ca93e887f4aaee5af438eb -
Branch / Tag:
refs/tags/teamtomo@v0.6.0 - Owner: https://github.com/teamtomo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@181e7dd30d6548fa65ca93e887f4aaee5af438eb -
Trigger Event:
push
-
Statement type:
File details
Details for the file torch_structure_manipulation-0.6.0-py3-none-any.whl.
File metadata
- Download URL: torch_structure_manipulation-0.6.0-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70300bb7c2f1d0b96e9ba6a8fa8912bcea7c7e7e15737388d17bf1abffbfe462
|
|
| MD5 |
f7ee163dfdee8b9df0c8787e4993055c
|
|
| BLAKE2b-256 |
002d6917d0bf1e9ee85bb75722f880b74a793522a1adcae3552cd93a3a23f392
|
Provenance
The following attestation bundles were made for torch_structure_manipulation-0.6.0-py3-none-any.whl:
Publisher:
deploy.yml on teamtomo/teamtomo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torch_structure_manipulation-0.6.0-py3-none-any.whl -
Subject digest:
70300bb7c2f1d0b96e9ba6a8fa8912bcea7c7e7e15737388d17bf1abffbfe462 - Sigstore transparency entry: 2798489706
- Sigstore integration time:
-
Permalink:
teamtomo/teamtomo@181e7dd30d6548fa65ca93e887f4aaee5af438eb -
Branch / Tag:
refs/tags/teamtomo@v0.6.0 - Owner: https://github.com/teamtomo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@181e7dd30d6548fa65ca93e887f4aaee5af438eb -
Trigger Event:
push
-
Statement type: