--- trunk/OOPSE/libmdtools/ForceFields.cpp 2004/05/22 18:16:18 1187 +++ trunk/OOPSE/libmdtools/ForceFields.cpp 2004/06/01 17:15:43 1212 @@ -198,7 +198,7 @@ void ForceFields::doForces( int calcPot, int calcStres } - if (entry_plug->useThermInt) { + if (entry_plug->useSolidThermInt && !entry_plug->useLiquidThermInt) { factor = pow(entry_plug->thermIntLambda, entry_plug->thermIntK); for (i=0; i < entry_plug->integrableObjects.size(); i++) { @@ -215,6 +215,23 @@ void ForceFields::doForces( int calcPot, int calcStres entry_plug->vHarm = entry_plug->restraint->getVharm(); } + if (entry_plug->useLiquidThermInt) { + + factor = pow(entry_plug->thermIntLambda, entry_plug->thermIntK); + for (i=0; i < entry_plug->integrableObjects.size(); i++) { + for (j=0; j< 3; j++) + frc[3*i + j] *= factor; + if (entry_plug->integrableObjects[i]->isDirectional()) { + for (j=0; j< 3; j++) + trq[3*i + j] *= factor; + } + } + entry_plug->vRaw = entry_plug->lrPot; + entry_plug->lrPot *= factor; + entry_plug->lrPot += entry_plug->restraint->Calc_Restraint_Forces(entry_plug->integrableObjects); + entry_plug->vHarm = entry_plug->restraint->getVharm(); + } + #ifdef IS_MPI sprintf( checkPointMsg, "returned from the force calculation.\n" );