ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/brains/MoleculeCreator.cpp
(Generate patch)

Comparing:
trunk/src/brains/MoleculeCreator.cpp (file contents), Revision 1442 by gezelter, Mon May 10 17:28:26 2010 UTC vs.
branches/development/src/brains/MoleculeCreator.cpp (file contents), Revision 1665 by gezelter, Tue Nov 22 20:38:56 2011 UTC

# Line 36 | Line 36
36   * [1]  Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).            
37   * [2]  Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).          
38   * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008).          
39 < * [4]  Vardeman & Gezelter, in progress (2009).                        
39 > * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40 > * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41   */
42    
43   /**
# Line 138 | Line 139 | namespace OpenMD {
139      int nCutoffGroups = molStamp->getNCutoffGroups();
140      for (int i = 0; i < nCutoffGroups; ++i) {
141        currentCutoffGroupStamp = molStamp->getCutoffGroupStamp(i);
142 <      cutoffGroup = createCutoffGroup(mol, currentCutoffGroupStamp);
142 >      cutoffGroup = createCutoffGroup(mol, currentCutoffGroupStamp, localIndexMan);
143        mol->addCutoffGroup(cutoffGroup);
144      }
145  
# Line 169 | Line 170 | namespace OpenMD {
170      // every single free atom
171      
172      for (fai = freeAtoms.begin(); fai != freeAtoms.end(); ++fai) {
173 <      cutoffGroup = createCutoffGroup(mol, *fai);
173 >      cutoffGroup = createCutoffGroup(mol, *fai, localIndexMan);
174        mol->addCutoffGroup(cutoffGroup);
175      }
176      //create constraints
# Line 449 | Line 450 | namespace OpenMD {
450    }
451    
452  
453 <  CutoffGroup* MoleculeCreator::createCutoffGroup(Molecule* mol, CutoffGroupStamp* stamp) {
453 >  CutoffGroup* MoleculeCreator::createCutoffGroup(Molecule* mol,
454 >                                                  CutoffGroupStamp* stamp,
455 >                                                  LocalIndexManager* localIndexMan) {
456      int nAtoms;
457      CutoffGroup* cg;
458      Atom* atom;
# Line 461 | Line 464 | namespace OpenMD {
464        assert(atom);
465        cg->addAtom(atom);
466      }
467 <
467 >    
468 >    //set the local index of this cutoffGroup, global index will be set later
469 >    cg->setLocalIndex(localIndexMan->getNextCutoffGroupIndex());
470 >    
471      return cg;
472    }    
473 <
474 <  CutoffGroup* MoleculeCreator::createCutoffGroup(Molecule * mol, Atom* atom) {
473 >  
474 >  CutoffGroup* MoleculeCreator::createCutoffGroup(Molecule * mol, Atom* atom,
475 >                                                  LocalIndexManager* localIndexMan) {
476      CutoffGroup* cg;
477      cg  = new CutoffGroup();
478      cg->addAtom(atom);
479 +
480 +    //set the local index of this cutoffGroup, global index will be set later
481 +    cg->setLocalIndex(localIndexMan->getNextCutoffGroupIndex());
482 +
483      return cg;
484    }
485  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines