ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/primitives/Molecule.cpp
(Generate patch)

Comparing branches/new_design/OOPSE-3.0/src/primitives/Molecule.cpp (file contents):
Revision 1695 by tim, Mon Nov 1 22:52:57 2004 UTC vs.
Revision 1733 by tim, Fri Nov 12 06:19:04 2004 UTC

# Line 37 | Line 37 | namespace oopse {
37   #include "utils/MemoryUtils.hpp"
38  
39   namespace oopse {
40 + Molecule::Molecule(int stampId, int globalIndex, const std::string& molName)
41 +    : stampId_(stampId), globalIndex_(globalIndex), moleculeName_(molName) {
42  
43 + }
44 +
45   Molecule::~Molecule() {
46  
47      MemoryUtils::deleteVectorOfPointer(atoms_);
# Line 112 | Line 116 | void Molecule::complete() {
116  
117      if (integrableObjects_.size() != allAtoms.size() - rigidAtoms.size()) {
118          //Some atoms in rigidAtoms are not in allAtoms, something must be wrong
119 +        sprintf(painCave.errMsg, "Atoms in rigidbody are not in the atom list of the same molecule");
120 +
121 +        painCave.isFatal = 1;
122 +        simError();        
123      }
124  
125      integrableObjects_.insert(integrableObjects_.end(), rigidBodies_.begin(), rigidBodies_.end());
# Line 204 | Line 212 | void Molecule::calcForces() {
212      }
213  
214      for (bond = beginBond(bondIter); bond != NULL; bond = nextBond(bondIter)) {
215 <        bond->calcForce();
215 >        bond->calc_forces();
216      }
217  
218      for (bend = beginBend(bendIter); bend != NULL; bend = nextBend(bendIter)) {
219 <        bend->calcForce();
219 >        bend->calc_forces();
220      }
221  
222      for (torsion = beginTorsion(torsionIter); torsion != NULL; torsion = nextTorsion(torsionIter)) {
223 <        torsion->calcForce();
223 >        torsion->calc_forces();
224      }
225      
226   }
# Line 234 | Line 242 | double Molecule::getPotential() {
242      //}
243  
244      for (bond = beginBond(bondIter); bond != NULL; bond = nextBond(bondIter)) {
245 <        potential += bond->getPotential();
245 >        potential += bond->get_potential();
246      }
247  
248      for (bend = beginBend(bendIter); bend != NULL; bend = nextBend(bendIter)) {
249 <        potential += bend->getPotential();
249 >        potential += bend->get_potential();
250      }
251  
252      for (torsion = beginTorsion(torsionIter); torsion != NULL; torsion = nextTorsion(torsionIter)) {
253 <        potential += torsion->getPotential();
253 >        potential += torsion->get_potential();
254      }
255      
256      return potential;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines