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 |
|
/** |
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 |
|
|
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 |
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; |
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 |
|
|