| 80 | 
  | 
    return result; | 
| 81 | 
  | 
  } | 
| 82 | 
  | 
   | 
| 83 | 
< | 
  SimInfo::SimInfo(MakeStamps* stamps, std::vector<std::pair<MoleculeStamp*, int> >& molStampPairs,  | 
| 84 | 
< | 
                   ForceField* ff, Globals* simParams) :  | 
| 85 | 
< | 
    stamps_(stamps), forceField_(ff), simParams_(simParams),  | 
| 83 | 
> | 
  SimInfo::SimInfo(ForceField* ff, Globals* simParams) :  | 
| 84 | 
> | 
    forceField_(ff), simParams_(simParams),  | 
| 85 | 
  | 
    ndf_(0), ndfRaw_(0), ndfTrans_(0), nZconstraint_(0), | 
| 86 | 
  | 
    nGlobalMols_(0), nGlobalAtoms_(0), nGlobalCutoffGroups_(0),  | 
| 87 | 
  | 
    nGlobalIntegrableObjects_(0), nGlobalRigidBodies_(0), | 
| 89 | 
  | 
    nIntegrableObjects_(0),  nCutoffGroups_(0), nConstraints_(0), | 
| 90 | 
  | 
    sman_(NULL), fortranInitialized_(false) { | 
| 91 | 
  | 
 | 
| 93 | 
– | 
             | 
| 94 | 
– | 
      std::vector<std::pair<MoleculeStamp*, int> >::iterator i; | 
| 92 | 
  | 
      MoleculeStamp* molStamp; | 
| 93 | 
  | 
      int nMolWithSameStamp; | 
| 94 | 
  | 
      int nCutoffAtoms = 0; // number of atoms belong to cutoff groups | 
| 96 | 
  | 
      CutoffGroupStamp* cgStamp;     | 
| 97 | 
  | 
      RigidBodyStamp* rbStamp; | 
| 98 | 
  | 
      int nRigidAtoms = 0; | 
| 99 | 
< | 
     | 
| 100 | 
< | 
      for (i = molStampPairs.begin(); i !=molStampPairs.end(); ++i) { | 
| 101 | 
< | 
        molStamp = i->first; | 
| 102 | 
< | 
        nMolWithSameStamp = i->second; | 
| 99 | 
> | 
      std::vector<Component*> components = simParams->getComponents(); | 
| 100 | 
> | 
       | 
| 101 | 
> | 
      for (std::vector<Component*>::iterator i = components.begin(); i !=components.end(); ++i) { | 
| 102 | 
> | 
        molStamp = (*i)->getMoleculeStamp(); | 
| 103 | 
> | 
        nMolWithSameStamp = (*i)->getNMol(); | 
| 104 | 
  | 
         | 
| 105 | 
  | 
        addMoleculeStamp(molStamp, nMolWithSameStamp); | 
| 106 | 
  | 
 | 
| 107 | 
  | 
        //calculate atoms in molecules | 
| 108 | 
  | 
        nGlobalAtoms_ += molStamp->getNAtoms() *nMolWithSameStamp;    | 
| 109 | 
  | 
 | 
| 112 | 
– | 
 | 
| 110 | 
  | 
        //calculate atoms in cutoff groups | 
| 111 | 
  | 
        int nAtomsInGroups = 0; | 
| 112 | 
  | 
        int nCutoffGroupsInStamp = molStamp->getNCutoffGroups(); | 
| 113 | 
  | 
         | 
| 114 | 
  | 
        for (int j=0; j < nCutoffGroupsInStamp; j++) { | 
| 115 | 
< | 
          cgStamp = molStamp->getCutoffGroup(j); | 
| 115 | 
> | 
          cgStamp = molStamp->getCutoffGroupStamp(j); | 
| 116 | 
  | 
          nAtomsInGroups += cgStamp->getNMembers(); | 
| 117 | 
  | 
        } | 
| 118 | 
  | 
 | 
| 125 | 
  | 
        int nRigidBodiesInStamp = molStamp->getNRigidBodies(); | 
| 126 | 
  | 
         | 
| 127 | 
  | 
        for (int j=0; j < nRigidBodiesInStamp; j++) { | 
| 128 | 
< | 
          rbStamp = molStamp->getRigidBody(j); | 
| 128 | 
> | 
          rbStamp = molStamp->getRigidBodyStamp(j); | 
| 129 | 
  | 
          nAtomsInRigidBodies += rbStamp->getNMembers(); | 
| 130 | 
  | 
        } | 
| 131 | 
  | 
 | 
| 164 | 
  | 
    } | 
| 165 | 
  | 
    molecules_.clear(); | 
| 166 | 
  | 
        | 
| 170 | 
– | 
    delete stamps_; | 
| 167 | 
  | 
    delete sman_; | 
| 168 | 
  | 
    delete simParams_; | 
| 169 | 
  | 
    delete forceField_; | 
| 270 | 
  | 
          } | 
| 271 | 
  | 
        } | 
| 272 | 
  | 
             | 
| 273 | 
< | 
      }//end for (integrableObject) | 
| 274 | 
< | 
    }// end for (mol) | 
| 273 | 
> | 
      } | 
| 274 | 
> | 
    } | 
| 275 | 
  | 
     | 
| 276 | 
  | 
    // n_constraints is local, so subtract them on each processor | 
| 277 | 
  | 
    ndf_local -= nConstraints_; | 
| 1087 | 
  | 
    } | 
| 1088 | 
  | 
     | 
| 1089 | 
  | 
    // let's pass some summation method variables to fortran | 
| 1090 | 
< | 
    setElectrostaticSummationMethod( &esm ); | 
| 1091 | 
< | 
    notifyFortranElectrostaticMethod( &esm ); | 
| 1090 | 
> | 
    setElectrostaticSumMethod( &esm ); | 
| 1091 | 
> | 
    setFortranElectrostaticMethod( &esm ); | 
| 1092 | 
  | 
    setScreeningMethod( &sm ); | 
| 1093 | 
  | 
    setDampingAlpha( &alphaVal ); | 
| 1094 | 
  | 
    setReactionFieldDielectric( &dielectric ); |