ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/SimSetup.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/SimSetup.cpp (file contents):
Revision 1186 by chrisfen, Thu May 20 20:24:07 2004 UTC vs.
Revision 1187 by chrisfen, Sat May 22 18:16:18 2004 UTC

# Line 950 | Line 950 | void SimSetup::gatherInfo(void){
950      info[i].orthoTolerance = globals->getOrthoBoxTolerance();
951  
952      // check for thermodynamic integration
953 <    if (globals->haveThermIntLambda() && globals->haveThermIntK()) {
954 <      info[i].thermIntLambda = globals->getThermIntLambda();
955 <      info[i].thermIntK = globals->getThermIntK();
956 <      info[i].useThermInt = 1;
957 <      
958 <      Restraints *myRestraint = new Restraints(tot_nmol, info[i].thermIntLambda, info[i].thermIntK);
959 <      info[i].restraint = myRestraint;
953 >    if (globals->getUseThermInt()) {
954 >      if (globals->haveThermIntLambda() && globals->haveThermIntK()) {
955 >        info[i].useThermInt = globals->getUseThermInt();
956 >        info[i].thermIntLambda = globals->getThermIntLambda();
957 >        info[i].thermIntK = globals->getThermIntK();
958 >        
959 >        Restraints *myRestraint = new Restraints(tot_nmol, info[i].thermIntLambda, info[i].thermIntK);
960 >        info[i].restraint = myRestraint;
961 >      }
962 >      else {
963 >        sprintf(painCave.errMsg,
964 >                "SimSetup Error:\n"
965 >                "\tKeyword useThermInt was set to 'true' but\n"
966 >                "\tthermodynamicIntegrationLambda (and/or\n"
967 >                "\tthermodynamicIntegrationK) was not specified.\n"
968 >                "\tPlease provide a lambda value and k value in your .bass file.\n");
969 >        painCave.isFatal = 1;
970 >        simError();    
971 >      }
972      }
973 +    else if(globals->haveThermIntLambda() || globals->haveThermIntK()){
974 +        sprintf(painCave.errMsg,
975 +                "SimSetup Warning: If you want to use Thermodynamic\n"
976 +                "\tIntegration, set useThermInt to 'true' in your .bass file.\n"
977 +                "\tThe useThermInt keyword is 'false' by default, so your\n"
978 +                "\tlambda and/or k values are being ignored.\n");
979 +        painCave.isFatal = 0;
980 +        simError();  
981 +    }
982    }
983    
984    //setup seed for random number generator

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines