ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/SimSetup.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/SimSetup.cpp (file contents):
Revision 1156 by gezelter, Tue May 11 16:00:22 2004 UTC vs.
Revision 1157 by tim, Tue May 11 20:33:41 2004 UTC

# Line 183 | Line 183 | void SimSetup::makeMolecules(void){
183    BendStamp* currentBend;
184    TorsionStamp* currentTorsion;
185    RigidBodyStamp* currentRigidBody;
186 <
186 >  CutoffGroupStamp* currentCutoffGroup;
187 >  CutoffGroup* myCutoffGroup;
188 >  
189    bond_pair* theBonds;
190    bend_set* theBends;
191    torsion_set* theTorsions;
# Line 216 | Line 218 | void SimSetup::makeMolecules(void){
218        molInfo.nBends = comp_stamps[stampID]->getNBends();
219        molInfo.nTorsions = comp_stamps[stampID]->getNTorsions();
220        molInfo.nRigidBodies = comp_stamps[stampID]->getNRigidBodies();
221 +      molInfo.nCutoffGroups = comp_stamps[stampID]->getNCutoffGroups();
222        
223        molInfo.myAtoms = &(info[k].atoms[atomOffset]);
224  
# Line 480 | Line 483 | void SimSetup::makeMolecules(void){
483          info[k].rigidBodies.push_back(myRB);
484        }
485        
486 +
487 +      //creat cutoff group for molecule
488 +      molInfo.myCutoffGroups.clear();
489 +      for (j = 0; j < molInfo.nCutoffGroups; j++){
490 +
491 +        currentCutoffGroup = comp_stamps[stampID]->getCutoffGroup(j);
492 +        nMembers = currentCutoffGroup->getNMembers();
493  
494 +        myCutoffGroup = new CutoffGroup();
495 +        
496 +        for (int cg = 0; cg < nMembers; cg++) {
497 +
498 +          // molI is atom numbering inside this molecule
499 +          molI = currentCutoffGroup->getMember(cg);    
500 +
501 +          // tempI is atom numbering on local processor
502 +          tempI = molI + atomOffset;
503 +
504 +          myCutoffGroup->addAtom(info[k].atoms[tempI]);          
505 +        }
506 +
507 +        molInfo.myCutoffGroups.push_back(myCutoffGroup);
508 +      }//end for (j = 0; j < molInfo.nCutoffGroups; j++)
509 +      
510 +
511 +
512        // After this is all set up, scan through the atoms to
513        // see if they can be added to the integrableObjects:
514  
# Line 1282 | Line 1310 | void SimSetup::compList(void){
1310    LinkedMolStamp* headStamp = new LinkedMolStamp();
1311    LinkedMolStamp* currentStamp = NULL;
1312    comp_stamps = new MoleculeStamp * [n_components];
1313 +  bool haveCutoffGroups;
1314  
1315 +  haveCutoffGroups = false;
1316 +  
1317    // make an array of molecule stamps that match the components used.
1318    // also extract the used stamps out into a separate linked list
1319  
# Line 1317 | Line 1348 | void SimSetup::compList(void){
1348        headStamp->add(currentStamp);
1349        comp_stamps[i] = headStamp->match(id);
1350      }
1351 +
1352 +    if(comp_stamps[i]->getNCutoffGroups() > 0)
1353 +      haveCutoffGroups = true;    
1354    }
1355 +    
1356 +  for (i = 0; i < nInfo; i++)
1357 +    info[i].haveCutoffGroups = haveCutoffGroups;
1358  
1359   #ifdef IS_MPI
1360    strcpy(checkPointMsg, "Component stamps successfully extracted\n");
# Line 1492 | Line 1529 | void SimSetup::makeSysArrays(void){
1529      info[l].atoms = the_atoms;
1530      info[l].molecules = the_molecules;
1531      info[l].nGlobalExcludes = 0;
1532 <
1532 >    
1533      the_ff->setSimInfo(info);
1534    }
1535   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines