5.21.1. tools.center_of_mass

eminus.tools.center_of_mass(coords, masses=None)[source]

Calculate the center of mass for a set of coordinates and masses.

Parameters:

coords – Array of real-space coordinates.

Keyword Arguments:

masses – Mass or weight for each coordinate.

Returns:

Center of mass.