Skip to main content

matdomain-structure

Immutable, source-neutral values for one exact crystallographic structure occurrence. The package preserves the input cell and caller-provided site sequence, provides deterministic canonical bytes and digests, and exposes one explicit site-wrapping transformation.

Python 3.12 or newer is required. Install the published distribution with:

pip install matdomain-structure

From this workspace, install it directly with:

python -m pip install -e ./packages/matdomain-structure
from matdomain.structure import Lattice, Site, Species, StructureValue

structure = StructureValue(
    lattice=Lattice(matrix=((3.0, 0.0, 0.0), (0.0, 3.0, 0.0), (0.0, 0.0, 3.0))),
    periodic_axes=(True, True, True),
    sites=(
        Site(fractional_coordinates=(0.0, 0.0, 0.0), species=(Species(kind="element", symbol="Li", occupancy=1.0),)),
    ),
)

digest = structure.canonical_digest()
wrapped = structure.wrap_sites_to_unit_cell()

Lattice rows are measured in angstroms, and each periodic-axis flag applies to the corresponding lattice row. Charge is measured in elementary-charge units and is None when unknown. Fractional coordinates are retained exactly until wrap_sites_to_unit_cell() is called; that operation wraps only periodic axes and reports every site whose coordinate representative changed.

Each site has at least one non-vacancy component and occupancy totaling one within an absolute tolerance of 1e-8. Partial occupancy uses one explicit vacancy component. Site order remains input order; species within a site are canonicalized by identity, including optional isotope mass number, oxidation state, and spin. The versioned canonical bytes are the exact Python wire profile returned by canonical_bytes() and contain no product provenance or scene data. Spin is the optional idealized species value represented by pymatgen, not a calculated site magnetic moment.

This distribution versions independently and uses tags of the form matdomain-structure-vX.Y.Z. The workspace release workflow checks and builds both distributions but publishes only the package named by the tag.

Download files

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

Source Distribution

matdomain_structure-0.1.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

matdomain_structure-0.1.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file matdomain_structure-0.1.0.tar.gz.

File metadata

  • Download URL: matdomain_structure-0.1.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for matdomain_structure-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5b9ce8a339d23214ffc8921e700c5cd8a91a20c1e678a53a5257d55dc964bcd0
MD5 8bdd8103f1ed7c4aa93e0a1484bf3234
BLAKE2b-256 3e1b4ea1b91b5390012aff0d48bdcf1ca3833ea1bea0873581f2880a924cbccd

See more details on using hashes here.

Provenance

The following attestation bundles were made for matdomain_structure-0.1.0.tar.gz:

Publisher: publish.yml on tiannianzhu/matdomain

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

File details

Details for the file matdomain_structure-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for matdomain_structure-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7f01b0b079da44c6a25c66bceb105cd8b75670b36f13339626551ea14b5c41e7
MD5 588383312d9c95ce5051e51b78766511
BLAKE2b-256 5adbd2829da7b6e144d38c1c8665e793ac23a790af20af508d1a9e2dd582bb30

See more details on using hashes here.

Provenance

The following attestation bundles were made for matdomain_structure-0.1.0-py3-none-any.whl:

Publisher: publish.yml on tiannianzhu/matdomain

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

Release history Release notifications | RSS feed

This release

0.1.0 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