centre_of_mass(atom_id=None,
model=None,
return_mass=False)
| source code
|
Calculate and return the centre of mass of the structure.
- 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.
- 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.
|