--- trunk/OOPSE/libmdtools/SimSetup.cpp 2004/04/12 20:32:20 1097 +++ trunk/OOPSE/libmdtools/SimSetup.cpp 2004/04/13 16:26:03 1104 @@ -167,7 +167,7 @@ void SimSetup::makeMolecules(void){ void SimSetup::makeMolecules(void){ int i, j, k; - int exI, exJ, exK, exL, slI; + int exI, exJ, exK, exL, slI, slJ; int tempI, tempJ, tempK, tempL; int molI; int stampID, atomOffset, rbOffset; @@ -465,7 +465,40 @@ void SimSetup::makeMolecules(void){ } } + + molInfo.myRigidBodies.push_back(myRB); + info[k].rigidBodies.push_back(myRB); + } + + + // After this is all set up, scan through the atoms to + // see if they can be added to the integrableObjects: + + for (j = 0; j < molInfo.nAtoms; j++){ + +#ifdef IS_MPI + slJ = molInfo.myAtoms[j]->getGlobalIndex(); +#else + slJ = j+atomOffset; +#endif + + // if they aren't on the skip list, then they can be integrated + + if (skipList.find(slJ) == skipList.end()) { + mySD = (StuntDouble *) molInfo.myAtoms[j]; + info[k].integrableObjects.push_back(mySD); + molInfo.myIntegrableObjects.push_back(mySD); + } + } + + // all rigid bodies are integrated: + + for (j = 0; j < molInfo.nRigidBodies; j++) { + mySD = (StuntDouble *) molInfo.myRigidBodies[j]; + info[k].integrableObjects.push_back(mySD); + molInfo.myIntegrableObjects.push_back(mySD); } + // send the arrays off to the forceField for init. @@ -482,28 +515,7 @@ void SimSetup::makeMolecules(void){ delete[] theBonds; delete[] theBends; delete[] theTorsions; - } - - // build up the integrableObjects vector: - - for (i = 0; i < info[k].n_atoms; i++) { - -#ifdef IS_MPI - slI = info[k].atoms[i]->getGlobalIndex(); -#else - slI = i; -#endif - - if (skipList.find(slI) == skipList.end()) { - mySD = (StuntDouble *) info[k].atoms[i]; - info[k].integrableObjects.push_back(mySD); - } - } - for (i = 0; i < info[k].rigidBodies.size(); i++) { - mySD = (StuntDouble *) info[k].rigidBodies[i]; - info[k].integrableObjects.push_back(mySD); - } - + } } #ifdef IS_MPI