httk.atomistic.storage¶
Submodules¶
Classes¶
Represent one exact site-index group in a stored assembly. |
|
Represent the exact durable form of an assembly. |
|
Represent the native durable backing for an asserted asymmetric unit. |
|
Represent an exact durable cell basis, precision, and periodicity. |
|
Represent a durable authoritative or implicit composition declaration. |
|
Represent one exact declared element amount. |
|
Represent the native durable backing for a symmetry fundamental domain. |
|
Represent one exact normalized composition ratio. |
|
Represent the authoritative exact elemental composition of a structure. |
|
Represent a bounded numeric summary for one trajectory observable. |
|
Represent the durable backing for a geometry-free protostructure. |
|
Represent the durable backing for a standard-setting dummy-species prototype. |
|
Represent an exact stored-setting-to-own transform. |
|
Represent exact durable reduced coordinates and their stated precision. |
|
Represent one aligned, optionally decorated species constituent. |
|
Represent a frozen storable snapshot of an atomistic species. |
|
Represent optional symmetry metadata for a unit-cell structure. |
|
Represent bounded trajectory identity and reference-frame summary. |
|
Represent the native durable backing for an explicit unit-cell structure. |
|
Represent one occupied standard-setting Wyckoff orbit and its real species. |
|
Represent an exact Wyckoff site with its retained representative. |
Package Contents¶
- class httk.atomistic.storage.AssemblyGroupRecord[source]¶
Represent one exact site-index group in a stored assembly.
- Parameters:
sites – The distinct non-negative site indexes in the group.
- class httk.atomistic.storage.AssemblyRecord[source]¶
Represent the exact durable form of an assembly.
- Parameters:
groups – The site-index groups.
group_probabilities – The probability of each group.
group_probabilities_precision – The probability precision, if stated.
- groups: tuple[AssemblyGroupRecord, Ellipsis]¶
- group_probabilities: tuple[fractions.Fraction, Ellipsis]¶
- group_probabilities_precision: tuple[fractions.Fraction, Ellipsis] | None = None¶
- class httk.atomistic.storage.ASUStructureRecord[source]¶
Bases:
FundamentalDomainStructureRecordRepresent the native durable backing for an asserted asymmetric unit.
Inherit the fundamental-domain constructor fields and validation contract while retaining the asymmetric-unit record identity.
- class httk.atomistic.storage.CellRecord[source]¶
Represent an exact durable cell basis, precision, and periodicity.
Hand-built records are shape-checked on construction and semantically validated at the storage boundary.
- Parameters:
basis – The row-major exact cell basis values.
precision – The absolute basis precision, if stated.
periodicity – The flags identifying periodic basis rows.
- basis: tuple[httk.core.SurdScalar, Ellipsis]¶
- precision: fractions.Fraction | None¶
- class httk.atomistic.storage.ChemicalCompositionRecord[source]¶
Represent a durable authoritative or implicit composition declaration.
- Parameters:
amounts – The exact element amounts.
mode – The composition declaration mode.
- amounts: tuple[CompositionAmountRecord, Ellipsis]¶
- class httk.atomistic.storage.CompositionAmountRecord[source]¶
Represent one exact declared element amount.
- Parameters:
element – The element symbol.
amount – The exact element amount.
precision – The amount precision, if stated.
- amount: fractions.Fraction¶
- precision: fractions.Fraction | None = None¶
- class httk.atomistic.storage.FundamentalDomainStructureRecord[source]¶
Represent the native durable backing for a symmetry fundamental domain.
Hand-built records are shape-checked on construction and semantically validated at the storage boundary or explicitly through the validation hook. The record’s content identity is independent of its storage layout.
- Parameters:
cell – The durable cell record.
domain_sites – The symmetry-distinct durable site records.
species – The distinct durable species records.
spacegroup_it_number – The International Tables space-group number.
spacegroup_hall_entry – The setting that names the stored Wyckoff data.
setting_transform – The stored-setting-to-own transform.
coordinate_precision – The reduced-coordinate precision, if stated.
normalized_composition – The authoritative normalized composition.
charge – The explicitly assigned cell charge, if stated.
molecular – Whether the structure describes molecular entities.
assemblies – The site assemblies, if stated.
chemical_composition – The chemical composition declaration, if stated.
chemical_formula_descriptive – The descriptive formula, if stated.
chemical_formula_hill – The Hill formula, if stated.
optimization_type – The optimization provenance, if stated.
immutable_id – The immutable source identifier, if stated.
last_modified – The source modification timestamp, if stated.
- cell: CellRecord¶
- domain_sites: tuple[WyckoffSiteRecord, Ellipsis]¶
- species: tuple[SpeciesRecord, Ellipsis]¶
- setting_transform: SettingTransformRecord¶
- coordinate_precision: fractions.Fraction | None¶
- normalized_composition: NormalizedCompositionRecord¶
- charge: fractions.Fraction | None = None¶
- assemblies: tuple[AssemblyRecord, Ellipsis] | None = None¶
- chemical_composition: ChemicalCompositionRecord | None = None¶
- last_modified: Annotated[datetime.datetime | None, IdentitySkip()] = None¶
- class httk.atomistic.storage.NormalizedCompositionAmountRecord[source]¶
Represent one exact normalized composition ratio.
- Parameters:
element – The element symbol.
ratio – The exact normalized element ratio.
amount – The exact source element amount.
precision – The source amount precision, if stated.
- ratio: fractions.Fraction¶
- amount: fractions.Fraction¶
- precision: fractions.Fraction | None = None¶
- class httk.atomistic.storage.NormalizedCompositionRecord[source]¶
Represent the authoritative exact elemental composition of a structure.
This relation is semantic normalized data, not a rendered-formula cache. It retains each exact central element amount together with its source precision, and makes the same complete-composition facts available to every durable structure backing for response construction and exact filtering.
- Parameters:
amounts – The normalized element amounts.
complete – Whether the composition accounts for all structure content.
- amounts: tuple[NormalizedCompositionAmountRecord, Ellipsis]¶
- class httk.atomistic.storage.ObservableSummaryRecord[source]¶
Represent a bounded numeric summary for one trajectory observable.
- Parameters:
name – The observable name.
first – The first finite value, if available.
last – The last finite value, if available.
minimum – The minimum finite value, if available.
maximum – The maximum finite value, if available.
- class httk.atomistic.storage.ProtostructureRecord[source]¶
Represent the durable backing for a geometry-free protostructure.
The record carries exactly the value identity of
Protostructure: its standard-setting space group and its occupied Wyckoff positions with real species, in the protostructure’s canonical order (sorted by species name then Wyckoff letter). It has no cell or coordinates. The record’s content identity is independent of its storage layout, and two equal protostructures produce the same content identity.- Parameters:
spacegroup_it_number – The International Tables space-group number.
spacegroup_hall_entry – The standard-setting Hall entry that names the stored Wyckoff data.
occupations – The occupied Wyckoff positions and their real species.
- occupations: tuple[WyckoffOccupationRecord, Ellipsis]¶
- property id: str¶
Expose the layout-independent content identifier.
- Returns:
The content identifier for this record.
- Return type:
- property label: str¶
Expose a compact, deterministic query label for this protostructure.
The format is
"<it_number>/<wyckoff>:<species_name>,..."listing the occupations in the record’s stored canonical order. It is a convenience and query column only; it is not the record’s identity (the content id is), and it is NOT unique across distinct protostructures: species that share a name but differ in any otherSpeciesfield (concentration, charges, spins, mass, precision, …) collide on the same label, so aGROUP BY labelmay under-count distinct protostructures — count and deduplicate by row (content id), never by label.- Returns:
The compact protostructure label.
- Return type:
- class httk.atomistic.storage.PrototypeRecord[source]¶
Represent the durable backing for a standard-setting dummy-species prototype.
The record carries the geometric per-structure prototype: its standard-setting space group, its cell (surd-capable), the symmetry-distinct Wyckoff sites with their exact free parameters, and the distinct dummy species. Distinct prototypes with different free parameters are distinct values, so no content deduplication is expected; the content identity remains deterministic.
- Parameters:
cell – The durable standard-setting cell record.
wyckoff_sites – The symmetry-distinct durable Wyckoff site records.
species – The distinct durable dummy species records.
spacegroup_it_number – The International Tables space-group number.
spacegroup_hall_entry – The standard-setting Hall entry that names the stored Wyckoff data.
coordinate_precision – The reduced-coordinate precision, if stated.
- cell: CellRecord¶
- wyckoff_sites: tuple[WyckoffSiteRecord, Ellipsis]¶
- species: tuple[SpeciesRecord, Ellipsis]¶
- coordinate_precision: fractions.Fraction | None = None¶
- class httk.atomistic.storage.SettingTransformRecord[source]¶
Represent an exact stored-setting-to-own transform.
Hand-built records are shape-checked on construction and semantically validated at the storage boundary or explicitly through the validation hook.
- Parameters:
matrix – The stored-setting-to-own fractional coordinate matrix.
vector – The stored-setting-to-own fractional origin shift.
hall_entry – The normalized Hall entry, if known.
- matrix: Annotated[httk.core.FracVector, httk.core.storage.markers.Shape(3, 3)]¶
- vector: tuple[fractions.Fraction, Ellipsis]¶
- class httk.atomistic.storage.SitesRecord[source]¶
Represent exact durable reduced coordinates and their stated precision.
- Parameters:
reduced_coords – The exact reduced coordinates, one site per row.
precision – The fractional coordinate precision, if stated.
- reduced_coords: Annotated[httk.core.FracVector, httk.core.storage.markers.Shape(0, 3)]¶
- precision: fractions.Fraction | None¶
- class httk.atomistic.storage.SpeciesConstituentRecord[source]¶
Represent one aligned, optionally decorated species constituent.
- Parameters:
chemical_symbol – The constituent’s chemical symbol.
concentration – The constituent occupancy.
mass – The constituent mass, if stated.
charge – The constituent charge, if stated.
spin – The constituent spin, if stated.
label – The constituent label, if stated.
concentration_precision – The occupancy precision, if stated.
- concentration: fractions.Fraction¶
- charge: fractions.Fraction | None = None¶
- spin: fractions.Fraction | None = None¶
- concentration_precision: fractions.Fraction | None = None¶
- class httk.atomistic.storage.SpeciesRecord[source]¶
Represent a frozen storable snapshot of an atomistic species.
Hand-built records are shape-checked on construction and semantically validated at the storage boundary or explicitly through the validation hook.
- Parameters:
name – The species name.
constituents – The aligned constituent records.
original_name – The source species name, if stated.
attached – The attached constituent symbols, if stated.
nattached – The counts corresponding to
attached, if stated.
- constituents: tuple[SpeciesConstituentRecord, Ellipsis]¶
- property concentration: tuple[fractions.Fraction, Ellipsis]¶
Expose the constituent occupancies.
- Returns:
The concentrations in constituent order.
- Return type:
tuple[fractions.Fraction, Ellipsis]
- property concentration_precision: tuple[fractions.Fraction | None, Ellipsis] | None¶
Expose the constituent occupancy precision.
- Returns:
The precisions in constituent order, or
Nonewhen unstated.- Return type:
tuple[fractions.Fraction | None, Ellipsis] | None
- property charges: tuple[fractions.Fraction | None, Ellipsis] | None¶
Expose the constituent charges.
- Returns:
The charges in constituent order, or
Nonewhen unstated.- Return type:
tuple[fractions.Fraction | None, Ellipsis] | None
- property spins: tuple[fractions.Fraction | None, Ellipsis] | None¶
Expose the constituent spins.
- Returns:
The spins in constituent order, or
Nonewhen unstated.- Return type:
tuple[fractions.Fraction | None, Ellipsis] | None
- class httk.atomistic.storage.SymmetryRecord[source]¶
Represent optional symmetry metadata for a unit-cell structure.
Hand-built records are shape-checked on construction and semantically validated at the storage boundary or explicitly through the validation hook.
- Parameters:
space_group_it_number – The International Tables space-group number, if known.
space_group_symbol_hall – The Hall symbol, if known.
space_group_symbol_hermann_mauguin – The Hermann-Mauguin symbol, if known.
space_group_symbol_hermann_mauguin_extended – The extended Hermann-Mauguin symbol, if known.
space_group_symmetry_operations_xyz – The symmetry operations in xyz form, if known.
wyckoff_positions – The Wyckoff position symbols, if known.
- class httk.atomistic.storage.TrajectoryRecord[source]¶
Represent bounded trajectory identity and reference-frame summary.
Frame data is never stored in this record. Hand-built records are shape-checked on construction and semantically validated at the storage boundary or explicitly through the validation hook.
- Parameters:
nframes – The total number of trajectory frames.
species – The distinct durable species records.
species_at_sites – The species name occupying each site.
reference_frame_indexes – The sorted indexes of retained reference frames.
reference_frame_structures – The retained reference-frame records.
observable_summaries – The summaries of trajectory observables.
source_locator – The source locator, if stated.
immutable_id – The immutable source identifier, if stated.
last_modified – The source modification timestamp, if stated.
- species: tuple[SpeciesRecord, Ellipsis]¶
- reference_frame_structures: tuple[UnitcellStructureRecord, Ellipsis]¶
- observable_summaries: tuple[ObservableSummaryRecord, Ellipsis]¶
- last_modified: Annotated[datetime.datetime | None, IdentitySkip()] = None¶
- class httk.atomistic.storage.UnitcellStructureRecord[source]¶
Represent the native durable backing for an explicit unit-cell structure.
Hand-built records are shape-checked on construction and semantically validated at the storage boundary or explicitly through the validation hook. The record’s content identity is independent of its storage layout.
- Parameters:
cell – The durable cell record.
sites – The durable site-coordinate record.
species – The distinct durable species records.
species_at_sites – The species name occupying each site.
normalized_composition – The authoritative normalized composition.
charge – The explicitly assigned cell charge, if stated.
site_moments_kind – The site-moment kind, if stated.
site_moments – The flattened exact site-moment components, if stated.
site_moments_precision – The site-moment precision, if stated.
molecular – Whether the structure describes molecular entities.
assemblies – The site assemblies, if stated.
symmetry – The symmetry metadata, if stated.
chemical_composition – The chemical composition declaration, if stated.
chemical_formula_descriptive – The descriptive formula, if stated.
chemical_formula_hill – The Hill formula, if stated.
optimization_type – The optimization provenance, if stated.
immutable_id – The immutable source identifier, if stated.
last_modified – The source modification timestamp, if stated.
- cell: CellRecord¶
- sites: SitesRecord¶
- species: tuple[SpeciesRecord, Ellipsis]¶
- normalized_composition: NormalizedCompositionRecord¶
- charge: fractions.Fraction | None = None¶
- site_moments: tuple[httk.core.SurdScalar, Ellipsis] | None = None¶
- site_moments_precision: fractions.Fraction | None = None¶
- assemblies: tuple[AssemblyRecord, Ellipsis] | None = None¶
- symmetry: SymmetryRecord | None = None¶
- chemical_composition: ChemicalCompositionRecord | None = None¶
- last_modified: Annotated[datetime.datetime | None, IdentitySkip()] = None¶
- class httk.atomistic.storage.WyckoffOccupationRecord[source]¶
Represent one occupied standard-setting Wyckoff orbit and its real species.
The occupation carries a real (possibly disordered)
SpeciesRecord; it is the durable analogue ofWyckoffOccupation.- Parameters:
wyckoff – The Wyckoff letter in the standard setting.
species – The durable real species occupying the orbit.
- species: SpeciesRecord¶
- class httk.atomistic.storage.WyckoffSiteRecord[source]¶
Represent an exact Wyckoff site with its retained representative.
The owning record’s
domain_sitesfield is storage-visible and deliberately unchanged.- Parameters:
wyckoff – The Wyckoff letter.
free_parameters – The exact free-parameter values.
species – The owning species name.
representative – The retained representative coordinate, if present.
moment_kind – The site-moment kind, if present.
moment – The flattened exact site-moment components, if present.
moment_precision – The site-moment precision, if present.
- free_parameters: tuple[fractions.Fraction, Ellipsis]¶
- representative: tuple[fractions.Fraction, Ellipsis] | None = None¶
- moment: tuple[httk.core.SurdScalar, Ellipsis] | None = None¶
- moment_precision: fractions.Fraction | None = None¶