eon.geometry.cell¶
Cell matrix helpers (row-vector lattice, ASE/vesin convention).
Module Contents¶
Functions¶
Convert cell lengths + CON angles (degrees) to a 3×3 row-vector box. |
|
Inverse of :func: |
API¶
- eon.geometry.cell.length_angle_to_box(boxlengths, angles) numpy.ndarray[source]¶
Convert cell lengths + CON angles (degrees) to a 3×3 row-vector box.
anglesis(alpha, beta, gamma)as CON header line 4 specifies: alpha = angle(b, c), beta = angle(a, c), gamma = angle(a, b). Vectoralies on x andbin the xy plane.
- eon.geometry.cell.box_to_length_angle(box) tuple[numpy.ndarray, numpy.ndarray][source]¶
Inverse of :func:
length_angle_to_box: lengths and (alpha, beta, gamma).The cosine is the raw dot product over the product of the lengths, clamped to [-1, 1], then
libmacos. That is the same map the C++ writer uses, so both sides spell the same angle bytes.