mag4.lattice
Lattice geometry helpers (matrix construction, fractional ↔ Cartesian, PBC distances).
Functions
|
Index of the site in |
|
Convert fractional → Cartesian coordinates. |
|
Cartesian coordinates of a list of atoms in the legacy |
|
Build a 3×3 lattice matrix (columns = a, b, c) from cell parameters. |
|
Minimum-image distance between two Cartesian points. |
- mag4.lattice.lattice_matrix(a, b, c, alpha_deg, beta_deg, gamma_deg)[source]
Build a 3×3 lattice matrix (columns = a, b, c) from cell parameters.
- Parameters:
- Returns:
Lattice matrix with the three lattice vectors as columns.
- Return type:
ndarray, shape (3, 3)
- mag4.lattice.get_cartesian_coords(atoms, lat_mat)[source]
Cartesian coordinates of a list of atoms in the legacy
[label, x, y, z, …]format.