atomistics.calculators.hessian.check_force_constants#
- atomistics.calculators.hessian.check_force_constants(structure: Atoms, force_constants: ndarray) ndarray[source]#
Check the shape of the force constants array and return a valid force constants array.
- Parameters:
structure (Atoms) – The reference structure.
force_constants (np.ndarray) – The force constants array.
- Returns:
The valid force constants array.
- Return type:
np.ndarray
- Raises:
ValueError – If the reference structure is not set or the force constants shape is not recognized.