147 |
|
// make the output filenames |
148 |
|
|
149 |
|
makeOutNames(); |
150 |
– |
|
151 |
– |
if (globals->haveMinimizer()) |
152 |
– |
// make minimizer |
153 |
– |
makeMinimizer(); |
154 |
– |
else |
155 |
– |
// make the integrator |
156 |
– |
makeIntegrator(); |
150 |
|
|
151 |
|
#ifdef IS_MPI |
152 |
|
mpiSim->mpiRefresh(); |
155 |
|
// initialize the Fortran |
156 |
|
|
157 |
|
initFortran(); |
158 |
+ |
|
159 |
+ |
if (globals->haveMinimizer()) |
160 |
+ |
// make minimizer |
161 |
+ |
makeMinimizer(); |
162 |
+ |
else |
163 |
+ |
// make the integrator |
164 |
+ |
makeIntegrator(); |
165 |
+ |
|
166 |
|
} |
167 |
|
|
168 |
|
|
263 |
|
else{ |
264 |
|
|
265 |
|
molInfo.myAtoms[j] = new Atom((j + atomOffset), info[k].getConfiguration()); |
266 |
+ |
|
267 |
|
} |
268 |
|
|
269 |
|
molInfo.myAtoms[j]->setType(currentAtom->getType()); |
268 |
– |
|
270 |
|
#ifdef IS_MPI |
271 |
|
|
272 |
|
molInfo.myAtoms[j]->setGlobalIndex(globalAtomIndex[j + atomOffset]); |
410 |
|
info[k].excludes->addPair(exK, exL); |
411 |
|
} |
412 |
|
|
413 |
+ |
|
414 |
+ |
molInfo.myRigidBodies.clear(); |
415 |
+ |
|
416 |
|
for (j = 0; j < molInfo.nRigidBodies; j++){ |
417 |
|
|
418 |
|
currentRigidBody = comp_stamps[stampID]->getRigidBody(j); |
422 |
|
|
423 |
|
myRB = new RigidBody(); |
424 |
|
|
425 |
< |
sprintf(rbName,"%s_RB_%s", molName, j); |
425 |
> |
sprintf(rbName,"%s_RB_%d", molName, j); |
426 |
|
myRB->setType(rbName); |
427 |
|
|
428 |
|
for (rb1 = 0; rb1 < nMembers; rb1++) { |
464 |
|
// used for the exclude list: |
465 |
|
|
466 |
|
#ifdef IS_MPI |
467 |
< |
exI = info[k].atoms[tempI]->getGlobalIndex() + 1; |
468 |
< |
exJ = info[k].atoms[tempJ]->getGlobalIndex() + 1; |
467 |
> |
exI = molInfo.myAtoms[tempI]->getGlobalIndex() + 1; |
468 |
> |
exJ = molInfo.myAtoms[tempJ]->getGlobalIndex() + 1; |
469 |
|
#else |
470 |
< |
exI = tempI + 1; |
471 |
< |
exJ = tempJ + 1; |
470 |
> |
exI = molInfo.myAtoms[tempI]->getIndex() + 1; |
471 |
> |
exJ = molInfo.myAtoms[tempJ]->getIndex() + 1; |
472 |
|
#endif |
473 |
|
|
474 |
|
info[k].excludes->addPair(exI, exJ); |
483 |
|
|
484 |
|
// After this is all set up, scan through the atoms to |
485 |
|
// see if they can be added to the integrableObjects: |
486 |
+ |
|
487 |
+ |
molInfo.myIntegrableObjects.clear(); |
488 |
+ |
|
489 |
|
|
490 |
|
for (j = 0; j < molInfo.nAtoms; j++){ |
491 |
|
|
964 |
|
void SimSetup::finalInfoCheck(void){ |
965 |
|
int index; |
966 |
|
int usesDipoles; |
967 |
+ |
int usesCharges; |
968 |
|
int i; |
969 |
|
|
970 |
|
for (i = 0; i < nInfo; i++){ |
976 |
|
usesDipoles = (info[i].atoms[index])->hasDipole(); |
977 |
|
index++; |
978 |
|
} |
979 |
< |
|
979 |
> |
index = 0; |
980 |
> |
usesCharges = 0; |
981 |
> |
while ((index < info[i].n_atoms) && !usesCharges){ |
982 |
> |
usesCharges= (info[i].atoms[index])->hasCharge(); |
983 |
> |
index++; |
984 |
> |
} |
985 |
|
#ifdef IS_MPI |
986 |
|
int myUse = usesDipoles; |
987 |
|
MPI_Allreduce(&myUse, &usesDipoles, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD); |
1032 |
|
info[i].dielectric = globals->getDielectric(); |
1033 |
|
} |
1034 |
|
else{ |
1035 |
< |
if (usesDipoles){ |
1035 |
> |
if (usesDipoles || usesCharges){ |
1036 |
|
if (!globals->haveECR()){ |
1037 |
|
sprintf(painCave.errMsg, |
1038 |
|
"SimSetup Warning: No value was set for electrostaticCutoffRadius.\n" |