| 1450 | 
  | 
} | 
| 1451 | 
  | 
 | 
| 1452 | 
  | 
void SimSetup::calcSysValues(void){ | 
| 1453 | 
< | 
  int i; | 
| 1453 | 
> | 
  int i, j; | 
| 1454 | 
> | 
  int ncutgroups, atomsingroups, ngroupsinstamp; | 
| 1455 | 
  | 
 | 
| 1456 | 
  | 
  int* molMembershipArray; | 
| 1457 | 
+ | 
  CutoffGroupStamp* cg; | 
| 1458 | 
  | 
 | 
| 1459 | 
  | 
  tot_atoms = 0; | 
| 1460 | 
  | 
  tot_bonds = 0; | 
| 1461 | 
  | 
  tot_bends = 0; | 
| 1462 | 
  | 
  tot_torsions = 0; | 
| 1463 | 
  | 
  tot_rigid = 0; | 
| 1464 | 
+ | 
  tot_groups = 0; | 
| 1465 | 
  | 
  for (i = 0; i < n_components; i++){ | 
| 1466 | 
  | 
    tot_atoms += components_nmol[i] * comp_stamps[i]->getNAtoms(); | 
| 1467 | 
  | 
    tot_bonds += components_nmol[i] * comp_stamps[i]->getNBonds(); | 
| 1468 | 
  | 
    tot_bends += components_nmol[i] * comp_stamps[i]->getNBends(); | 
| 1469 | 
  | 
    tot_torsions += components_nmol[i] * comp_stamps[i]->getNTorsions(); | 
| 1470 | 
  | 
    tot_rigid += components_nmol[i] * comp_stamps[i]->getNRigidBodies(); | 
| 1471 | 
+ | 
 | 
| 1472 | 
+ | 
    ncutgroups = comp_stamps[i]->getNCutoffGroups(); | 
| 1473 | 
+ | 
    atomsingroups = 0; | 
| 1474 | 
+ | 
    for (j=0; j < ncutgroups; j++) { | 
| 1475 | 
+ | 
      cg = comp_stamps[i]->getCutoffGroup(j); | 
| 1476 | 
+ | 
      atomsingroups += cg->getNMembers(); | 
| 1477 | 
+ | 
    } | 
| 1478 | 
+ | 
    ngroupsinstamp = comp_stamps[i]->getNAtoms() - atomsingroups + ncutgroups; | 
| 1479 | 
+ | 
    tot_groups += components_nmol[i] * ngroupsinstamp;     | 
| 1480 | 
  | 
  } | 
| 1481 | 
  | 
   | 
| 1482 | 
  | 
  tot_SRI = tot_bonds + tot_bends + tot_torsions; | 
| 1489 | 
  | 
    info[i].n_torsions = tot_torsions; | 
| 1490 | 
  | 
    info[i].n_SRI = tot_SRI; | 
| 1491 | 
  | 
    info[i].n_mol = tot_nmol; | 
| 1492 | 
< | 
 | 
| 1492 | 
> | 
    info[i].ngroup = tot_groups; | 
| 1493 | 
  | 
    info[i].molMembershipArray = molMembershipArray; | 
| 1494 | 
  | 
  } | 
| 1495 | 
  | 
} | 
| 1543 | 
  | 
  } | 
| 1544 | 
  | 
  local_SRI = local_bonds + local_bends + local_torsions; | 
| 1545 | 
  | 
 | 
| 1546 | 
< | 
  info[0].n_atoms = mpiSim->getMyNlocal();   | 
| 1546 | 
> | 
  info[0].n_atoms = mpiSim->getNAtomsLocal();   | 
| 1547 | 
  | 
   | 
| 1548 | 
  | 
 | 
| 1549 | 
  | 
  if (local_atoms != info[0].n_atoms){ | 
| 1591 | 
  | 
 | 
| 1592 | 
  | 
 | 
| 1593 | 
  | 
    molIndex = 0; | 
| 1594 | 
< | 
    for (i = 0; i < mpiSim->getTotNmol(); i++){ | 
| 1594 | 
> | 
    for (i = 0; i < mpiSim->getNMolGlobal(); i++){ | 
| 1595 | 
  | 
      if (mol2proc[i] == worldRank){ | 
| 1596 | 
  | 
        the_molecules[molIndex].setStampID(molCompType[i]); | 
| 1597 | 
  | 
        the_molecules[molIndex].setMyIndex(molIndex); |