convert_forces#

mbgdml.utils.convert_forces(forces, e_units_calc, r_units_calc, e_units, r_units)[source]#

Converts forces (or gradients) to specified units.

Parameters:
  • forces (numpy.ndarray) – An array with units of energy and distance matching e_units_calc and r_units_calc.

  • e_units_calc (str) – Specifies package-specific energy units used in calculation. Available units are 'eV', 'hartree', 'kcal/mol', and 'kJ/mol'.

  • r_units_calc (str) – Specifies package-specific distance units used in calculation. Available units are 'Angstrom' and 'bohr'.

  • e_units (str) – Desired units of energy. Available units are 'eV', 'hartree', 'kcal/mol', and 'kJ/mol'.

  • r_units (str) – Desired units of distance. Available units are 'Angstrom' and 'bohr'.

Returns:

Forces converted into the desired units.

Return type:

numpy.ndarray