httk.atomistic.standardization

Express an asymmetric-unit structure in its IT standard-setting cell.

The operation is exact after any optional recognition step. An ASU already carries the standard-setting Wyckoff data and the stored transform from that setting to its own cell, so the conventional cell is obtained by transforming the cell basis back and expanding a new identity-transform ASU.

Classes

ConventionalCellResult

A structure in its space group's IT standard-setting conventional cell.

Functions

conventional_cell(→ ConventionalCellResult)

Return structure in its space group's IT standard-setting conventional cell.

Module Contents

class httk.atomistic.standardization.ConventionalCellResult[source]

A structure in its space group’s IT standard-setting conventional cell.

asu is the new standard-setting ASU that was expanded to make structure. transform is the standard-to-own transform from the ASU that was supplied to, or recognized from, the operation; its orientation is \(f_own = f_std M^T + v\), so this operation undoes it for the cell basis. multiplier is the exact ratio of conventional-cell site count to input-cell site count. For the 527 vendored settings it is at least one; an untabulated, caller-supplied supercell transform may still produce a ratio below one.

structure: httk.atomistic.structure.Structure[source]
asu: httk.atomistic.asu_structure.ASUStructure[source]
spacegroup: httk.atomistic.spacegroup.Spacegroup[source]
transform: httk.atomistic.setting_transform.SettingTransform[source]
multiplier: fractions.Fraction[source]
httk.atomistic.standardization.conventional_cell(structure: httk.atomistic.structure_like.StructureLike | httk.atomistic.asu_structure.ASUStructure, *, tolerance: float | None = None, limit_denominator: int | None = None) ConventionalCellResult[source]

Return structure in its space group’s IT standard-setting conventional cell.

An existing ASUStructure (including an ASUStructureView, an ASU backend, or a full-cell view backed by one) is used exactly as stored. Supplying tolerance or limit_denominator for that path raises ValueError, because those arguments belong to recognition. Any other StructureLike is first passed to recognize_asu(). That tolerant step may snap measured coordinates onto symmetry positions and chooses the transform recorded in the result; it does not preserve an unstated input transform or promise a same_crystal() match to noisy input coordinates. The optional tolerance is a Cartesian matching distance and the optional denominator limit idealises free parameters.

The returned transform is the existing ASU’s transform, or the transform chosen by recognition for a plain input; the returned asu has an identity transform. Construction and expansion are exact, including the rhombohedral case where the standard hexagonal cell contains three primitive cells. Basis precision is multiplied by M.T() and coordinate precision by the maximum absolute column sum of inv(M.T()); unknown precision remains unknown. Requires a fully 3D-periodic structure.