--- trunk/OOPSE/libmdtools/Molecule.cpp 2004/04/15 16:18:26 1113 +++ trunk/OOPSE/libmdtools/Molecule.cpp 2004/06/04 03:15:31 1234 @@ -12,11 +12,12 @@ Molecule::Molecule( void ){ myBonds = NULL; myBends = NULL; myTorsions = NULL; - } Molecule::~Molecule( void ){ int i; + CutoffGroup* cg; + vector::iterator iter; if( myAtoms != NULL ){ for(i=0; i::iterator iterCutoff; + Atom* cutoffAtom; + vector::iterator iterAtom; + int atomIndex; + nAtoms = theInit.nAtoms; nMembers = nAtoms; nBonds = theInit.nBonds; @@ -61,17 +72,29 @@ void Molecule::initialize( molInit &theInit ){ for (int i = 0; i < myRigidBodies.size(); i++) myRigidBodies[i]->calcRefCoords(); - + + myCutoffGroups = theInit.myCutoffGroups; + nCutoffGroups = myCutoffGroups.size(); + + myConstraintPairs = theInit.myConstraintPairs; + } void Molecule::calcForces( void ){ int i; + double com[3]; for(i=0; iupdateAtoms(); } + //calculate the center of mass of the molecule + //getCOM(com); + //for(int i = 0; i < nAtoms; i ++) + // myAtoms[i]->setRc(com); + + for(i=0; icalc_forces(); }