--- trunk/OOPSE/libmdtools/SimSetup.cpp 2004/02/24 15:44:45 1064 +++ trunk/OOPSE/libmdtools/SimSetup.cpp 2004/03/17 14:22:59 1093 @@ -1663,7 +1663,34 @@ void SimSetup::setupZConstraint(SimInfo& theInfo){ } theInfo.addProperty(zconsForcePolicy); + + //set zcons gap + DoubleData* zconsGap = new DoubleData(); + zconsGap->setID(ZCONSGAP_ID); + + if (globals->haveZConsGap()){ + zconsGap->setData(globals->getZconsGap()); + theInfo.addProperty(zconsGap); + } + + //set zcons fixtime + DoubleData* zconsFixtime = new DoubleData(); + zconsFixtime->setID(ZCONSFIXTIME_ID); + + if (globals->haveZConsFixTime()){ + zconsFixtime->setData(globals->getZconsFixtime()); + theInfo.addProperty(zconsFixtime); + } + + //set zconsUsingSMD + IntData* zconsUsingSMD = new IntData(); + zconsUsingSMD->setID(ZCONSUSINGSMD_ID); + if (globals->haveZConsUsingSMD()){ + zconsUsingSMD->setData(globals->getZconsUsingSMD()); + theInfo.addProperty(zconsUsingSMD); + } + //Determine the name of ouput file and add it into SimInfo's property list //Be careful, do not use inFileName, since it is a pointer which //point to a string at master node, and slave nodes do not contain that string @@ -1693,7 +1720,8 @@ void SimSetup::setupZConstraint(SimInfo& theInfo){ tempParaItem.zPos = zconStamp[i]->getZpos(); tempParaItem.zconsIndex = zconStamp[i]->getMolIndex(); tempParaItem.kRatio = zconStamp[i]->getKratio(); - + tempParaItem.havingCantVel = zconStamp[i]->haveCantVel(); + tempParaItem.cantVel = zconStamp[i]->getCantVel(); zconsParaData->addItem(tempParaItem); } @@ -1756,7 +1784,7 @@ void SimSetup::makeMinimizer(){ param->setLineSearchTol(globals->getMinLSTol()); } - strcpy(ensemble, globals->getMinimizer()); + strcpy(minimizerName, globals->getMinimizer()); if (!strcasecmp(minimizerName, "CG")){ myOOPSEMinimizer = new PRCGMinimizer(&(info[i]), the_ff, param); @@ -1766,8 +1794,14 @@ void SimSetup::makeMinimizer(){ myOOPSEMinimizer = new SDMinimizer(&(info[i]), the_ff, param); } else{ - info[i].the_integrator = myOOPSEMinimizer; + sprintf(painCave.errMsg, + "SimSetup error: Unrecognized Minimizer, use Conjugate Gradient \n"); + painCave.isFatal = 0; + simError(); + + myOOPSEMinimizer = new PRCGMinimizer(&(info[i]), the_ff, param); } + info[i].the_integrator = myOOPSEMinimizer; //store the minimizer into simInfo info[i].the_minimizer = myOOPSEMinimizer;