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 610 by gezelter, Tue Jul 15 15:50:55 2003 UTC vs.
Revision 829 by gezelter, Tue Oct 28 16:03:37 2003 UTC

# Line 1 | Line 1
1 < #include <cstdlib>
1 > #include <stdlib.h>
2  
3  
4   #include "Molecule.hpp"
# 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