Expand description
Atom coordinate parsing.
This module provides functions to parse atom coordinates from various formats:
- String format:
"H 0 0 0; O 0 0 1.2" - List format:
["H 0 0 0", "O 0 0 1.2"] - Z-matrix format:
"O; H 1 0.94; H 1 0.94 2 104.5"
Supports ghost atoms (GHOST-X, X- prefix) and labeled atoms (H1,
H2).
StructsΒ§
EnumsΒ§
- Unit
- Unit of length for coordinates.
ConstantsΒ§
- ANG_
TO_ BOHR - Angstrom to Bohr conversion constant.
- BOHR_
TO_ ANG - Bohr to Angstrom conversion constant.
FunctionsΒ§
- cart2zmat
- Convert Cartesian coordinates to z-matrix format.
- charge_
to_ πsymbol - Convert atomic number to element symbol.
- cross3 π
- Compute cross product of two 3D vectors.
- dot3 π
- Compute dot product of two 3D vectors.
- find_
atom_ πindex - Find atom index by name in z-matrix.
- mat_
vec_ πmul - Multiply 3x3 matrix by 3-vector.
- norm3 π
- Compute norm of 3D vector.
- parse_
atom_ πline - Parse a single atom line.
- parse_
atom_ string - Parse atom coordinates from a string.
- parse_
atom_ symbol - Parse atom symbol, extracting element symbol and ghost status.
- parse_
float π - Parse a float value with error context.
- parse_
zmatrix - Parse z-matrix format coordinates.
- parse_
zmatrix_ πto_ entries - Parse z-matrix string to ZmatEntry structs and atom labels.
- rotation_
mat π - Rodriguesβ rotation formula: rotate by angle theta around axis vec. Returns 3x3 rotation matrix.
- symbol_
to_ charge - Get atomic number from element symbol using bse lookup.
- zmat2cart
- Convert z-matrix entries back to Cartesian coordinates.
- zmat_
entries_ πto_ cart - Convert ZmatEntry structs to Cartesian coordinates.
- zmatrix_
to_ πcartesian - Convert z-matrix parameters to Cartesian coordinates.