chemlab/chemlab — pull request #125 by rpforrest (2014-12-12 05:51:21+00:00)
Title: fixed center of mass formula

Old code returned with this error when attempting to calculate the center of mass for a molecule:

>>> benzene.center_of_mass
Traceback (most recent call last):
File "", line 1, in
File "chemlab/core/molecule.py", line 367, in center_of_mass
return ((self.m_array * self.r_array.T).sum(axis=1))/self.m_array.sum()
ValueError: operands could not be broadcast together with shapes (12,) (12,3)