| 84 | 
  | 
   | 
| 85 | 
  | 
  SimInfo::SimInfo(ForceField* ff, Globals* simParams) :  | 
| 86 | 
  | 
    forceField_(ff), simParams_(simParams),  | 
| 87 | 
< | 
    ndf_(0), ndfRaw_(0), ndfTrans_(0), nZconstraint_(0), | 
| 87 | 
> | 
    ndf_(0), fdf_local(0), ndfRaw_(0), ndfTrans_(0), nZconstraint_(0), | 
| 88 | 
  | 
    nGlobalMols_(0), nGlobalAtoms_(0), nGlobalCutoffGroups_(0),  | 
| 89 | 
  | 
    nGlobalIntegrableObjects_(0), nGlobalRigidBodies_(0), | 
| 90 | 
  | 
    nAtoms_(0), nBonds_(0),  nBends_(0), nTorsions_(0), nRigidBodies_(0), | 
| 290 | 
  | 
 | 
| 291 | 
  | 
  } | 
| 292 | 
  | 
 | 
| 293 | 
+ | 
  int SimInfo::getFdf() { | 
| 294 | 
+ | 
#ifdef IS_MPI | 
| 295 | 
+ | 
    MPI_Allreduce(&fdf_local,&fdf_,1,MPI_INT,MPI_SUM, MPI_COMM_WORLD); | 
| 296 | 
+ | 
#else | 
| 297 | 
+ | 
    fdf_ = fdf_local; | 
| 298 | 
+ | 
#endif | 
| 299 | 
+ | 
    return fdf_; | 
| 300 | 
+ | 
  } | 
| 301 | 
+ | 
     | 
| 302 | 
  | 
  void SimInfo::calcNdfRaw() { | 
| 303 | 
  | 
    int ndfRaw_local; | 
| 304 | 
  | 
 | 
| 978 | 
  | 
      if (simParams_->haveSwitchingRadius()) { | 
| 979 | 
  | 
        rsw_  = simParams_->getSwitchingRadius(); | 
| 980 | 
  | 
      } else { | 
| 981 | 
< | 
        rsw_ = rcut_; | 
| 981 | 
> | 
        if (fInfo_.SIM_uses_Charges |  | 
| 982 | 
> | 
            fInfo_.SIM_uses_Dipoles |  | 
| 983 | 
> | 
            fInfo_.SIM_uses_RF) { | 
| 984 | 
> | 
           | 
| 985 | 
> | 
          rsw_ = 0.85 * rcut_; | 
| 986 | 
> | 
          sprintf(painCave.errMsg, | 
| 987 | 
> | 
                  "SimCreator Warning: No value was set for the switchingRadius.\n" | 
| 988 | 
> | 
                  "\tOOPSE will use a default value of 85 percent of the cutoffRadius.\n" | 
| 989 | 
> | 
                  "\tswitchingRadius = %f. for this simulation\n", rsw_); | 
| 990 | 
> | 
        painCave.isFatal = 0; | 
| 991 | 
> | 
        simError(); | 
| 992 | 
> | 
        } else { | 
| 993 | 
> | 
          rsw_ = rcut_; | 
| 994 | 
> | 
          sprintf(painCave.errMsg, | 
| 995 | 
> | 
                  "SimCreator Warning: No value was set for the switchingRadius.\n" | 
| 996 | 
> | 
                  "\tOOPSE will use the same value as the cutoffRadius.\n" | 
| 997 | 
> | 
                  "\tswitchingRadius = %f. for this simulation\n", rsw_); | 
| 998 | 
> | 
          painCave.isFatal = 0; | 
| 999 | 
> | 
          simError(); | 
| 1000 | 
> | 
        } | 
| 1001 | 
  | 
      } | 
| 1002 | 
+ | 
       | 
| 1003 | 
  | 
      notifyFortranCutoffs(&rcut_, &rsw_); | 
| 1004 | 
  | 
       | 
| 1005 | 
  | 
    } else { | 
| 1127 | 
  | 
    } | 
| 1128 | 
  | 
     | 
| 1129 | 
  | 
    // let's pass some summation method variables to fortran | 
| 1130 | 
< | 
    setElectrostaticSumMethod( &esm ); | 
| 1130 | 
> | 
    setElectrostaticSummationMethod( &esm ); | 
| 1131 | 
  | 
    setFortranElectrostaticMethod( &esm ); | 
| 1132 | 
  | 
    setScreeningMethod( &sm ); | 
| 1133 | 
  | 
    setDampingAlpha( &alphaVal ); |