--- trunk/OOPSE/libmdtools/SimSetup.cpp 2004/05/20 20:24:07 1180 +++ trunk/OOPSE/libmdtools/SimSetup.cpp 2004/05/27 00:48:12 1198 @@ -950,13 +950,34 @@ void SimSetup::gatherInfo(void){ info[i].orthoTolerance = globals->getOrthoBoxTolerance(); // check for thermodynamic integration - if (globals->haveThermIntLambda() && globals->haveThermIntK()) { - info[i].thermIntLambda = globals->getThermIntLambda(); - info[i].thermIntK = globals->getThermIntK(); - info[i].useThermInt = 1; - - Restraints *myRestraint = new Restraints(tot_nmol, info[i].thermIntLambda, info[i].thermIntK); - info[i].restraint = myRestraint; + if (globals->getUseThermInt()) { + if (globals->haveThermIntLambda() && globals->haveThermIntK()) { + info[i].useThermInt = globals->getUseThermInt(); + info[i].thermIntLambda = globals->getThermIntLambda(); + info[i].thermIntK = globals->getThermIntK(); + + Restraints *myRestraint = new Restraints(tot_nmol, info[i].thermIntLambda, info[i].thermIntK); + info[i].restraint = myRestraint; + } + else { + sprintf(painCave.errMsg, + "SimSetup Error:\n" + "\tKeyword useThermInt was set to 'true' but\n" + "\tthermodynamicIntegrationLambda (and/or\n" + "\tthermodynamicIntegrationK) was not specified.\n" + "\tPlease provide a lambda value and k value in your .bass file.\n"); + painCave.isFatal = 1; + simError(); + } + } + else if(globals->haveThermIntLambda() || globals->haveThermIntK()){ + sprintf(painCave.errMsg, + "SimSetup Warning: If you want to use Thermodynamic\n" + "\tIntegration, set useThermInt to 'true' in your .bass file.\n" + "\tThe useThermInt keyword is 'false' by default, so your\n" + "\tlambda and/or k values are being ignored.\n"); + painCave.isFatal = 0; + simError(); } } @@ -1510,7 +1531,7 @@ void SimSetup::mpiMolDivide(void){ } local_SRI = local_bonds + local_bends + local_torsions; - info[0].n_atoms = mpiSim->getMyNlocal(); + info[0].n_atoms = mpiSim->getLocalNatoms(); if (local_atoms != info[0].n_atoms){