167 |
|
|
168 |
|
void SimSetup::makeMolecules(void){ |
169 |
|
int i, j, k; |
170 |
< |
int exI, exJ, exK, exL, slI; |
170 |
> |
int exI, exJ, exK, exL, slI, slJ; |
171 |
|
int tempI, tempJ, tempK, tempL; |
172 |
|
int molI; |
173 |
|
int stampID, atomOffset, rbOffset; |
465 |
|
|
466 |
|
} |
467 |
|
} |
468 |
+ |
|
469 |
+ |
molInfo.myRigidBodies.push_back(myRB); |
470 |
+ |
info[k].rigidBodies.push_back(myRB); |
471 |
+ |
} |
472 |
+ |
|
473 |
+ |
|
474 |
+ |
// After this is all set up, scan through the atoms to |
475 |
+ |
// see if they can be added to the integrableObjects: |
476 |
+ |
|
477 |
+ |
for (j = 0; j < molInfo.nAtoms; j++){ |
478 |
+ |
|
479 |
+ |
#ifdef IS_MPI |
480 |
+ |
slJ = molInfo.myAtoms[j]->getGlobalIndex(); |
481 |
+ |
#else |
482 |
+ |
slJ = j+atomOffset; |
483 |
+ |
#endif |
484 |
+ |
|
485 |
+ |
// if they aren't on the skip list, then they can be integrated |
486 |
+ |
|
487 |
+ |
if (skipList.find(slJ) == skipList.end()) { |
488 |
+ |
mySD = (StuntDouble *) molInfo.myAtoms[j]; |
489 |
+ |
info[k].integrableObjects.push_back(mySD); |
490 |
+ |
molInfo.myIntegrableObjects.push_back(mySD); |
491 |
+ |
} |
492 |
+ |
} |
493 |
+ |
|
494 |
+ |
// all rigid bodies are integrated: |
495 |
+ |
|
496 |
+ |
for (j = 0; j < molInfo.nRigidBodies; j++) { |
497 |
+ |
mySD = (StuntDouble *) molInfo.myRigidBodies[j]; |
498 |
+ |
info[k].integrableObjects.push_back(mySD); |
499 |
+ |
molInfo.myIntegrableObjects.push_back(mySD); |
500 |
|
} |
501 |
+ |
|
502 |
|
|
503 |
|
// send the arrays off to the forceField for init. |
504 |
|
|
515 |
|
delete[] theBonds; |
516 |
|
delete[] theBends; |
517 |
|
delete[] theTorsions; |
518 |
< |
} |
486 |
< |
|
487 |
< |
// build up the integrableObjects vector: |
488 |
< |
|
489 |
< |
for (i = 0; i < info[k].n_atoms; i++) { |
490 |
< |
|
491 |
< |
#ifdef IS_MPI |
492 |
< |
slI = info[k].atoms[i]->getGlobalIndex(); |
493 |
< |
#else |
494 |
< |
slI = i; |
495 |
< |
#endif |
496 |
< |
|
497 |
< |
if (skipList.find(slI) == skipList.end()) { |
498 |
< |
mySD = (StuntDouble *) info[k].atoms[i]; |
499 |
< |
info[k].integrableObjects.push_back(mySD); |
500 |
< |
} |
501 |
< |
} |
502 |
< |
for (i = 0; i < info[k].rigidBodies.size(); i++) { |
503 |
< |
mySD = (StuntDouble *) info[k].rigidBodies[i]; |
504 |
< |
info[k].integrableObjects.push_back(mySD); |
505 |
< |
} |
506 |
< |
|
518 |
> |
} |
519 |
|
} |
520 |
|
|
521 |
|
#ifdef IS_MPI |