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

Module mass

source code

Functions [hide private]
list of 3 floats (or tuple of a list of 3 floats and one float)
pipe_centre_of_mass(atom_id=None, model=None, return_mass=False, verbosity=1, missing_error=True)
Calculate and return the centre of mass of the structures in the current data pipe.
source code
Variables [hide private]
  __package__ = 'pipe_control.structure'

Imports: warn, centre_of_mass, RelaxWarning, check_structure


Function Details [hide private]

pipe_centre_of_mass(atom_id=None, model=None, return_mass=False, verbosity=1, missing_error=True)

source code 

Calculate and return the centre of mass of the structures in the current data pipe.

Parameters:
  • atom_id (str or None) - The molecule, residue, and atom identifier string. Only atoms matching this selection will be used.
  • model (int or None) - Only use a specific model.
  • return_mass (bool) - A flag which if False will cause only the centre of mass to be returned, but if True will cause the centre of mass and the mass itself to be returned as a tuple.
  • verbosity (int) - The amount of text to print out. 0 results in no printouts, 1 the full amount.
  • missing_error (bool) - A flag which if True will cause an error to be raised if structural data is absent. Otherwise if False, a warning will be given and the CoM of [0, 0, 0] will be returned.
Returns: list of 3 floats (or tuple of a list of 3 floats and one float)
The centre of mass vector, and additionally the mass.