make files safe against division by zero when computing center of mass for a collection of atoms
this closes #75