Molecule: Property#

Collection of functions for the calculation of molecular properties.

tad_mctc.molecule.property.center_of_mass(masses, positions)[source]#

Calculate the center of mass from the atomic coordinates and masses.

Parameters:
  • numbers (Tensor) – Atomic numbers for all atoms in the system of shape (..., nat).

  • positions (Tensor) – Cartesian coordinates of all atoms (shape: (..., nat, 3)).

Returns:

Cartesian coordinates of center of mass of shape (..., 3).

Return type:

Tensor

tad_mctc.molecule.property.inertia_moment(masses, positions, center_pa=True, pos_already_com=False)[source]#

Calculate the inertia tensor of the molecule.

Parameters:
  • masses (Tensor) – Atomic masses for all atoms in the system (shape: (..., nat)).

  • positions (Tensor) – Cartesian coordinates of all atoms (shape: (..., nat, 3)).

  • center_pa (bool, optional) – If True, the tensor is centered relative to the principal axes, which prepares for rotational analysis. Defaults to True.

  • pos_already_com (bool, optional) – If True, the positions are already centered at the center of mass. Defaults to False.

Returns:

Inertia tensor of shape (..., 3, 3).

Return type:

Tensor

tad_mctc.molecule.property.rot_consts(masses, positions)[source]#

Calculate the rotational constants from the inertia tensor.

\[B = \frac{h}{8 \pi^2 c I} = \frac{\hbar}{4 \pi c I}\]
Parameters:
  • masses (Tensor) – Atomic masses for all atoms in the system (shape: (..., nat)).

  • positions (Tensor) – Cartesian coordinates of all atoms (shape: (..., nat, 3)).

Returns:

Rotational constants of shape (..., 3).

Return type:

Tensor