OEGetCenterOfMassΒΆ

void OEGetCenterOfMass(const OEMolBase &mol, float *com, bool weightAtoms=false)

Calculates the center-of-mass of the molecule. The weightAtoms can be specified to weight each of the atom coordinates with the corresponding atom weights.

mol
The molecule to calculate center-of-mass.
com
The output center-of-mass array. The array must have a defined size of at least three.
weightAtoms
Flag indicating if the atom weights should be used to weight the coordinates during calculation.