ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/Molecule.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/Molecule.cpp (file contents):
Revision 657 by gezelter, Tue Jul 15 15:50:55 2003 UTC vs.
Revision 658 by tim, Thu Jul 31 15:35:07 2003 UTC

# Line 198 | Line 198 | double Molecule::getCOMvel( double COMvel[3] ) {
198    return mtot;
199  
200   }
201 +
202 + double Molecule::getTotalMass()
203 + {
204 +  int natoms;
205 +  Atom** atoms;
206 +  double totalMass;
207 +  
208 +  natoms = getNAtoms();
209 +  atoms = getMyAtoms();
210 +  totalMass = 0;
211 +  for(int i =0; i < natoms; i++){
212 +    totalMass += atoms[i]->getMass();
213 +  }
214 +
215 +  return totalMass;
216 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines