httk.atomistic.models.cell.params¶
Backend wrapping cell parameters (a, b, c, alpha, beta, gamma).
Classes¶
Backend for a cell backed by cell parameters |
Module Contents¶
- class httk.atomistic.models.cell.params.CellParams(obj, **hints)[source]¶
Bases:
httk.atomistic.models.cell.backend.CellBackendBackend for a cell backed by cell parameters
(a, b, c, alpha, beta, gamma).The native representation is a flat length-6 vector-like of the cell-vector lengths
a/b/cand the anglesalpha/beta/gammain degrees, stored as exactFractionvalues (parsed viaany_to_fraction()). The exactbasisis derived lazily and cached using the standard crystallographic orientation convention (first cell vector along x, second in the xy-plane); for the common Niven angles it is exact (radicals intact). Since parameters carry no separate length factor,scaleis the exact1andunscaled_basis == basis. Parameters carry neither orientation nor periodicity, so a cell → parameters → cell round-trip reproduces lengths and angles, and reproduces volume only for a fully periodic source. Reconstruction uses the fully periodic default and therefore discards any non-3D periodicity as well as the original orientation.unwrapreturns the original raw object.- Parameters:
obj (Any) – The six cell parameters in crystallographic order.
**hints (Any) – Backend-selection hints.
- property basis: httk.core.SurdVector[source]¶
Return the basis derived from the stored parameters.
- Returns:
The standard-orientation cell vectors.
- Return type:
- property scale: httk.core.SurdScalar[source]¶
Return the unit scale factor.
- Returns:
The factor applied to
unscaled_basis.- Return type:
- property unscaled_basis: httk.core.SurdVector[source]¶
Return the parameter-derived basis before scaling.
- Returns:
The cell vectors.
- Return type:
- property lengths: tuple[httk.core.SurdScalar, Ellipsis][source]¶
Return the natively stored cell-vector lengths.
- Returns:
The exact stored
a,b, andclengths.- Return type:
tuple[httk.core.SurdScalar, Ellipsis]
- property angles: tuple[fractions.Fraction, Ellipsis][source]¶
Return the natively stored cell angles in degrees.
- Returns:
The exact stored
alpha,beta, andgammaangles.- Return type:
tuple[fractions.Fraction, Ellipsis]
- property params: tuple[fractions.Fraction, Ellipsis][source]¶
The stored
(a, b, c, alpha, beta, gamma)in degrees.- Returns:
The exact cell parameters.
- Return type:
tuple[fractions.Fraction, Ellipsis]