--- trunk/OOPSE/libmdtools/Molecule.cpp 2003/07/30 21:17:01 657 +++ trunk/OOPSE/libmdtools/Molecule.cpp 2003/07/31 15:35:07 658 @@ -198,3 +198,19 @@ double Molecule::getCOMvel( double COMvel[3] ) { return mtot; } + +double Molecule::getTotalMass() +{ + int natoms; + Atom** atoms; + double totalMass; + + natoms = getNAtoms(); + atoms = getMyAtoms(); + totalMass = 0; + for(int i =0; i < natoms; i++){ + totalMass += atoms[i]->getMass(); + } + + return totalMass; +}