| 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; |
| 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 |
|
|
| 482 |
|
molInfo.myRigidBodies.push_back(myRB); |
| 483 |
|
info[k].rigidBodies.push_back(myRB); |
| 484 |
|
} |
| 485 |
+ |
|
| 486 |
+ |
|
| 487 |
+ |
//create 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 |
|
|
| 564 |
|
MPIcheckPoint(); |
| 565 |
|
#endif // is_mpi |
| 566 |
|
|
| 539 |
– |
// clean up the forcefield |
| 540 |
– |
|
| 541 |
– |
if (!globals->haveRcut()){ |
| 542 |
– |
|
| 543 |
– |
the_ff->calcRcut(); |
| 544 |
– |
|
| 545 |
– |
} else { |
| 546 |
– |
|
| 547 |
– |
the_ff->setRcut( globals->getRcut() ); |
| 548 |
– |
} |
| 549 |
– |
|
| 550 |
– |
the_ff->cleanMe(); |
| 567 |
|
} |
| 568 |
|
|
| 569 |
|
void SimSetup::initFromBass(void){ |
| 1004 |
|
#endif //is_mpi |
| 1005 |
|
|
| 1006 |
|
double theRcut, theRsw; |
| 1007 |
+ |
|
| 1008 |
+ |
if (globals->haveRcut()) { |
| 1009 |
+ |
theRcut = globals->getRcut(); |
| 1010 |
+ |
|
| 1011 |
+ |
if (globals->haveRsw()) |
| 1012 |
+ |
theRsw = globals->getRsw(); |
| 1013 |
+ |
else |
| 1014 |
+ |
theRsw = theRcut; |
| 1015 |
+ |
|
| 1016 |
+ |
info[i].setDefaultRcut(theRcut, theRsw); |
| 1017 |
+ |
|
| 1018 |
+ |
} else { |
| 1019 |
+ |
|
| 1020 |
+ |
the_ff->calcRcut(); |
| 1021 |
+ |
theRcut = info[i].getRcut(); |
| 1022 |
+ |
|
| 1023 |
+ |
if (globals->haveRsw()) |
| 1024 |
+ |
theRsw = globals->getRsw(); |
| 1025 |
+ |
else |
| 1026 |
+ |
theRsw = theRcut; |
| 1027 |
+ |
|
| 1028 |
+ |
info[i].setDefaultRcut(theRcut, theRsw); |
| 1029 |
+ |
} |
| 1030 |
|
|
| 1031 |
|
if (globals->getUseRF()){ |
| 1032 |
|
info[i].useReactionField = 1; |
| 1033 |
< |
|
| 1033 |
> |
|
| 1034 |
|
if (!globals->haveRcut()){ |
| 1035 |
|
sprintf(painCave.errMsg, |
| 1036 |
|
"SimSetup Warning: No value was set for the cutoffRadius.\n" |
| 1107 |
|
strcpy(checkPointMsg, "post processing checks out"); |
| 1108 |
|
MPIcheckPoint(); |
| 1109 |
|
#endif // is_mpi |
| 1110 |
+ |
|
| 1111 |
+ |
// clean up the forcefield |
| 1112 |
+ |
the_ff->cleanMe(); |
| 1113 |
|
} |
| 1114 |
|
|
| 1115 |
|
void SimSetup::initSystemCoords(void){ |
| 1324 |
|
LinkedMolStamp* headStamp = new LinkedMolStamp(); |
| 1325 |
|
LinkedMolStamp* currentStamp = NULL; |
| 1326 |
|
comp_stamps = new MoleculeStamp * [n_components]; |
| 1327 |
+ |
bool haveCutoffGroups; |
| 1328 |
|
|
| 1329 |
+ |
haveCutoffGroups = false; |
| 1330 |
+ |
|
| 1331 |
|
// make an array of molecule stamps that match the components used. |
| 1332 |
|
// also extract the used stamps out into a separate linked list |
| 1333 |
|
|
| 1362 |
|
headStamp->add(currentStamp); |
| 1363 |
|
comp_stamps[i] = headStamp->match(id); |
| 1364 |
|
} |
| 1365 |
+ |
|
| 1366 |
+ |
if(comp_stamps[i]->getNCutoffGroups() > 0) |
| 1367 |
+ |
haveCutoffGroups = true; |
| 1368 |
|
} |
| 1369 |
+ |
|
| 1370 |
+ |
for (i = 0; i < nInfo; i++) |
| 1371 |
+ |
info[i].haveCutoffGroups = haveCutoffGroups; |
| 1372 |
|
|
| 1373 |
|
#ifdef IS_MPI |
| 1374 |
|
strcpy(checkPointMsg, "Component stamps successfully extracted\n"); |
| 1543 |
|
info[l].atoms = the_atoms; |
| 1544 |
|
info[l].molecules = the_molecules; |
| 1545 |
|
info[l].nGlobalExcludes = 0; |
| 1546 |
< |
|
| 1546 |
> |
|
| 1547 |
|
the_ff->setSimInfo(info); |
| 1548 |
|
} |
| 1549 |
|
} |