| 190 |
|
set<int> skipList; |
| 191 |
|
|
| 192 |
|
double phi, theta, psi; |
| 193 |
+ |
char* molName; |
| 194 |
+ |
char rbName[100]; |
| 195 |
|
|
| 196 |
|
//init the forceField paramters |
| 197 |
|
|
| 208 |
|
|
| 209 |
|
for (i = 0; i < info[k].n_mol; i++){ |
| 210 |
|
stampID = info[k].molecules[i].getStampID(); |
| 211 |
+ |
molName = comp_stamps[stampID]->getID(); |
| 212 |
|
|
| 213 |
|
molInfo.nAtoms = comp_stamps[stampID]->getNAtoms(); |
| 214 |
|
molInfo.nBonds = comp_stamps[stampID]->getNBonds(); |
| 268 |
|
|
| 269 |
|
#ifdef IS_MPI |
| 270 |
|
|
| 271 |
< |
molInfo.myAtoms[j]->setGlobalIndex(globalIndex[j + atomOffset]); |
| 271 |
> |
molInfo.myAtoms[j]->setGlobalIndex(globalAtomIndex[j + atomOffset]); |
| 272 |
|
|
| 273 |
|
#endif // is_mpi |
| 274 |
|
} |
| 417 |
|
// Create the Rigid Body: |
| 418 |
|
|
| 419 |
|
myRB = new RigidBody(); |
| 420 |
+ |
|
| 421 |
+ |
sprintf(rbName,"%s_RB_%s", molName, j); |
| 422 |
+ |
myRB->setType(rbName); |
| 423 |
|
|
| 424 |
|
for (rb1 = 0; rb1 < nMembers; rb1++) { |
| 425 |
|
|
| 1352 |
|
int localMol, allMol; |
| 1353 |
|
int local_atoms, local_bonds, local_bends, local_torsions, local_SRI; |
| 1354 |
|
int local_rigid; |
| 1355 |
+ |
vector<int> globalAtomIndex; |
| 1356 |
+ |
vector<int> globalMolIndex; |
| 1357 |
|
|
| 1358 |
|
mpiSim = new mpiSimulation(info); |
| 1359 |
|
|
| 1360 |
< |
globalIndex = mpiSim->divideLabor(); |
| 1360 |
> |
mpiSim->divideLabor(); |
| 1361 |
> |
globalAtomIndex = mpiSim->getGlobalAtomIndex(); |
| 1362 |
> |
globalMolIndex = mpiSim->getGlobalMolIndex(); |
| 1363 |
|
|
| 1364 |
|
// set up the local variables |
| 1365 |
|
|
| 1373 |
|
local_bends = 0; |
| 1374 |
|
local_torsions = 0; |
| 1375 |
|
local_rigid = 0; |
| 1376 |
< |
globalAtomIndex = 0; |
| 1376 |
> |
globalAtomCounter = 0; |
| 1377 |
|
|
| 1378 |
|
for (i = 0; i < n_components; i++){ |
| 1379 |
|
for (j = 0; j < components_nmol[i]; j++){ |
| 1386 |
|
localMol++; |
| 1387 |
|
} |
| 1388 |
|
for (k = 0; k < comp_stamps[i]->getNAtoms(); k++){ |
| 1389 |
< |
info[0].molMembershipArray[globalAtomIndex] = allMol; |
| 1390 |
< |
globalAtomIndex++; |
| 1389 |
> |
info[0].molMembershipArray[globalAtomCounter] = allMol; |
| 1390 |
> |
globalAtomCounter++; |
| 1391 |
|
} |
| 1392 |
|
|
| 1393 |
|
allMol++; |
| 1455 |
|
#else // is_mpi |
| 1456 |
|
|
| 1457 |
|
molIndex = 0; |
| 1458 |
< |
globalAtomIndex = 0; |
| 1458 |
> |
globalAtomCounter = 0; |
| 1459 |
|
for (i = 0; i < n_components; i++){ |
| 1460 |
|
for (j = 0; j < components_nmol[i]; j++){ |
| 1461 |
|
the_molecules[molIndex].setStampID(i); |
| 1462 |
|
the_molecules[molIndex].setMyIndex(molIndex); |
| 1463 |
|
the_molecules[molIndex].setGlobalIndex(molIndex); |
| 1464 |
|
for (k = 0; k < comp_stamps[i]->getNAtoms(); k++){ |
| 1465 |
< |
info[l].molMembershipArray[globalAtomIndex] = molIndex; |
| 1466 |
< |
globalAtomIndex++; |
| 1465 |
> |
info[l].molMembershipArray[globalAtomCounter] = molIndex; |
| 1466 |
> |
globalAtomCounter++; |
| 1467 |
|
} |
| 1468 |
|
molIndex++; |
| 1469 |
|
} |