--- trunk/OOPSE/libmdtools/ForceFields.cpp 2004/05/12 16:38:45 1167 +++ trunk/OOPSE/libmdtools/ForceFields.cpp 2004/05/20 20:24:07 1180 @@ -81,6 +81,7 @@ void ForceFields::doForces( int calcPot, int calcStres double* u_l; double* rc; double* massRatio; + double factor; SimState* config; Molecule* myMols; @@ -197,6 +198,24 @@ void ForceFields::doForces( int calcPot, int calcStres } + if (entry_plug->useThermInt) { + myStunts = entry_plug->integrableObjects; + + factor = pow(entry_plug->thermIntLambda, entry_plug->thermIntK); + for (i=0; i < myStunts.size(); i++) { + for (j=0; j< 3; j++) + frc[3*i + j] *= factor; + if (myStunts[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(myStunts); + entry_plug->vHarm = entry_plug->restraint->getVharm(); + } + #ifdef IS_MPI sprintf( checkPointMsg, "returned from the force calculation.\n" ); @@ -228,3 +247,18 @@ void ForceFields::initFortran(int ljMixPolicy, int use #endif // is_mpi } + + +void ForceFields::initRestraints(){ + + // store the initial info. + entry_plug->restraint->Store_Init_Info(); + +} + +void ForceFields::dumpzAngle(){ + + // store the initial info. + entry_plug->restraint->Write_zAngle_File(); + +}