516 |
|
myCutoffGroup = new CutoffGroup(); |
517 |
|
|
518 |
|
#ifdef IS_MPI |
519 |
< |
myCutoffGroup->setGlobalIndex(globalGroupIndex[j + groupOffset]); |
519 |
> |
myCutoffGroup->setGlobalIndex(globalGroupIndex[groupOffset]); |
520 |
|
#else |
521 |
< |
myCutoffGroup->setGlobalIndex(j + groupOffset); |
521 |
> |
myCutoffGroup->setGlobalIndex(groupOffset); |
522 |
|
#endif |
523 |
|
|
524 |
|
for (int cg = 0; cg < nMembers; cg++) { |
531 |
|
|
532 |
|
#ifdef IS_MPI |
533 |
|
globalID = info[k].atoms[tempI]->getGlobalIndex(); |
534 |
< |
info[k].globalGroupMembership[globalID] = globalGroupIndex[j+groupOffset]; |
534 |
> |
info[k].globalGroupMembership[globalID] = globalGroupIndex[groupOffset]; |
535 |
|
#else |
536 |
|
globalID = info[k].atoms[tempI]->getIndex(); |
537 |
< |
info[k].globalGroupMembership[globalID] = j + groupOffset; |
538 |
< |
#endif |
539 |
< |
|
540 |
< |
|
541 |
< |
|
542 |
< |
myCutoffGroup->addAtom(info[k].atoms[tempI]); |
543 |
< |
|
537 |
> |
info[k].globalGroupMembership[globalID] = groupOffset; |
538 |
> |
#endif |
539 |
> |
myCutoffGroup->addAtom(info[k].atoms[tempI]); |
540 |
|
cutoffAtomSet.insert(tempI); |
541 |
|
} |
542 |
|
|
545 |
|
|
546 |
|
}//end for (j = 0; j < molInfo.nCutoffGroups; j++) |
547 |
|
|
552 |
– |
//creat a cutoff group for every atom in current molecule which does not belong to cutoffgroup defined at mdl file |
548 |
|
|
549 |
+ |
// create a cutoff group for every atom in current molecule which |
550 |
+ |
// does not belong to cutoffgroup defined at mdl file |
551 |
+ |
|
552 |
|
for(j = 0; j < molInfo.nAtoms; j++){ |
553 |
|
|
554 |
|
if(cutoffAtomSet.find(molInfo.myAtoms[j]->getIndex()) == cutoffAtomSet.end()){ |
555 |
|
myCutoffGroup = new CutoffGroup(); |
556 |
|
myCutoffGroup->addAtom(molInfo.myAtoms[j]); |
557 |
< |
|
557 |
> |
|
558 |
|
#ifdef IS_MPI |
559 |
< |
myCutoffGroup->setGlobalIndex(globalGroupIndex[j + groupOffset]); |
559 |
> |
myCutoffGroup->setGlobalIndex(globalGroupIndex[groupOffset]); |
560 |
|
globalID = info[k].atoms[atomOffset + j]->getGlobalIndex(); |
561 |
< |
info[k].globalGroupMembership[globalID] = globalGroupIndex[j+groupOffset]; |
561 |
> |
info[k].globalGroupMembership[globalID] = globalGroupIndex[groupOffset]; |
562 |
|
#else |
563 |
< |
myCutoffGroup->setGlobalIndex(j + groupOffset); |
563 |
> |
myCutoffGroup->setGlobalIndex(groupOffset); |
564 |
|
globalID = info[k].atoms[atomOffset + j]->getIndex(); |
565 |
< |
info[k].globalGroupMembership[globalID] = j+groupOffset; |
565 |
> |
info[k].globalGroupMembership[globalID] = groupOffset; |
566 |
|
#endif |
567 |
|
molInfo.myCutoffGroups.push_back(myCutoffGroup); |
568 |
|
groupOffset++; |
569 |
< |
} |
572 |
< |
|
569 |
> |
} |
570 |
|
} |
571 |
|
|
572 |
|
// After this is all set up, scan through the atoms to |