httk.atomistic.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.cell_params.CellParams(obj: Any, **hints: Any)[source]¶
Bases:
httk.atomistic.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 no orientation, so a cell → parameters → cell round-trip reproduces lengths, angles, and volume, but not the original orientation.unwrapreturns the original raw object.- property basis: httk.core.SurdVector[source]¶
- property scale: httk.core.SurdScalar[source]¶
- property unscaled_basis: httk.core.SurdVector[source]¶
- property params: tuple[fractions.Fraction, Ellipsis][source]¶
The stored
(a, b, c, alpha, beta, gamma)as exact Fractions (angles in degrees).
- unwrap() Any[source]¶
Return the most raw representation possible of this backend, i.e., if it uses a backend with an internal representaion - or if it can (possibly lossly) convert itself into a more raw representation that still would be recognized as a <Something>Like type, that representation will be returned. If this is not possible, the instance itself is returned.