Package lib :: Package structure :: Module mass
[hide private]
[frames] | no frames]

Module mass

source code

Functions [hide private]
3D list of floats, float
centre_of_mass(pos=None, elements=None, verbosity=1)
Calculate and return the centre of mass for the given atomic coordinates.
source code
Variables [hide private]
  __package__ = 'lib.structure'

Imports: float64, zeros, warn, return_atomic_mass, RelaxError, RelaxWarning


Function Details [hide private]

centre_of_mass(pos=None, elements=None, verbosity=1)

source code 

Calculate and return the centre of mass for the given atomic coordinates.

Parameters:
  • pos (list of lists of float) - The list of atomic coordinates.
  • elements (list of str) - The list of elements corresponding to the atoms.
  • verbosity (int) - The amount of text to print out. 0 results in no printouts, 1 the full amount.
Returns: 3D list of floats, float
The centre of mass vector and the mass.