| # | 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 | + | } | 
| – | Removed lines | 
| + | Added lines | 
| < | Changed lines | 
| > | Changed lines |