| 130 | 
  | 
  void NPTf::getPosScale(const Vector3d& pos, const Vector3d& COM, int index, Vector3d& sc) { | 
| 131 | 
  | 
 | 
| 132 | 
  | 
    /**@todo */ | 
| 133 | 
< | 
    Vector3d rj = (oldPos[index] + pos)/2.0 -COM; | 
| 133 | 
> | 
    Vector3d rj = (oldPos[index] + pos)/(RealType)2.0 -COM; | 
| 134 | 
  | 
    sc = eta * rj; | 
| 135 | 
  | 
  } | 
| 136 | 
  | 
 | 
| 140 | 
  | 
    int j; | 
| 141 | 
  | 
    int k; | 
| 142 | 
  | 
    Mat3x3d scaleMat; | 
| 143 | 
< | 
    double eta2ij; | 
| 144 | 
< | 
    double bigScale, smallScale, offDiagMax; | 
| 143 | 
> | 
    RealType eta2ij; | 
| 144 | 
> | 
    RealType bigScale, smallScale, offDiagMax; | 
| 145 | 
  | 
    Mat3x3d hm; | 
| 146 | 
  | 
    Mat3x3d hmnew; | 
| 147 | 
  | 
 | 
| 230 | 
  | 
 | 
| 231 | 
  | 
  bool NPTf::etaConverged() { | 
| 232 | 
  | 
    int i; | 
| 233 | 
< | 
    double diffEta, sumEta; | 
| 233 | 
> | 
    RealType diffEta, sumEta; | 
| 234 | 
  | 
 | 
| 235 | 
  | 
    sumEta = 0; | 
| 236 | 
  | 
    for(i = 0; i < 3; i++) { | 
| 242 | 
  | 
    return ( diffEta <= etaTolerance ); | 
| 243 | 
  | 
  } | 
| 244 | 
  | 
 | 
| 245 | 
< | 
  double NPTf::calcConservedQuantity(){ | 
| 245 | 
> | 
  RealType NPTf::calcConservedQuantity(){ | 
| 246 | 
  | 
 | 
| 247 | 
  | 
    chi= currentSnapshot_->getChi(); | 
| 248 | 
  | 
    integralOfChidt = currentSnapshot_->getIntegralOfChiDt(); | 
| 258 | 
  | 
    // of freedom).   | 
| 259 | 
  | 
    fkBT = info_->getNdf()*OOPSEConstant::kB *targetTemp;     | 
| 260 | 
  | 
     | 
| 261 | 
< | 
    double conservedQuantity; | 
| 262 | 
< | 
    double totalEnergy; | 
| 263 | 
< | 
    double thermostat_kinetic; | 
| 264 | 
< | 
    double thermostat_potential; | 
| 265 | 
< | 
    double barostat_kinetic; | 
| 266 | 
< | 
    double barostat_potential; | 
| 267 | 
< | 
    double trEta; | 
| 261 | 
> | 
    RealType conservedQuantity; | 
| 262 | 
> | 
    RealType totalEnergy; | 
| 263 | 
> | 
    RealType thermostat_kinetic; | 
| 264 | 
> | 
    RealType thermostat_potential; | 
| 265 | 
> | 
    RealType barostat_kinetic; | 
| 266 | 
> | 
    RealType barostat_potential; | 
| 267 | 
> | 
    RealType trEta; | 
| 268 | 
  | 
 | 
| 269 | 
  | 
    totalEnergy = thermo.getTotalE(); | 
| 270 | 
  | 
 | 
| 272 | 
  | 
 | 
| 273 | 
  | 
    thermostat_potential = fkBT* integralOfChidt / OOPSEConstant::energyConvert; | 
| 274 | 
  | 
 | 
| 275 | 
< | 
    SquareMatrix<double, 3> tmp = eta.transpose() * eta; | 
| 275 | 
> | 
    SquareMatrix<RealType, 3> tmp = eta.transpose() * eta; | 
| 276 | 
  | 
    trEta = tmp.trace(); | 
| 277 | 
  | 
     | 
| 278 | 
  | 
    barostat_kinetic = NkBT * tb2 * trEta /(2.0 * OOPSEConstant::energyConvert); |