--- trunk/OOPSE/libmdtools/ForceFields.cpp 2004/05/20 20:24:07 1180 +++ trunk/OOPSE/libmdtools/ForceFields.cpp 2004/06/01 17:15:43 1212 @@ -198,21 +198,37 @@ void ForceFields::doForces( int calcPot, int calcStres } - if (entry_plug->useThermInt) { - myStunts = entry_plug->integrableObjects; + if (entry_plug->useSolidThermInt && !entry_plug->useLiquidThermInt) { factor = pow(entry_plug->thermIntLambda, entry_plug->thermIntK); - for (i=0; i < myStunts.size(); i++) { + for (i=0; i < entry_plug->integrableObjects.size(); i++) { for (j=0; j< 3; j++) frc[3*i + j] *= factor; - if (myStunts[i]->isDirectional()) { + 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(myStunts); + entry_plug->lrPot += entry_plug->restraint->Calc_Restraint_Forces(entry_plug->integrableObjects); + 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(); } @@ -250,15 +266,19 @@ void ForceFields::initRestraints(){ void ForceFields::initRestraints(){ - + int i; // store the initial info. - entry_plug->restraint->Store_Init_Info(); + // set the omega values to zero + for (i=0; iintegrableObjects.size(); i++) + entry_plug->integrableObjects[i]->setZangle( 0.0 ); + entry_plug->restraint->Store_Init_Info(entry_plug->integrableObjects); + } void ForceFields::dumpzAngle(){ // store the initial info. - entry_plug->restraint->Write_zAngle_File(); + entry_plug->restraint->Write_zAngle_File(entry_plug->integrableObjects); }