--- trunk/OOPSE/libBASS/Globals.cpp 2004/05/20 20:27:26 1181 +++ trunk/OOPSE/libBASS/Globals.cpp 2004/05/22 18:17:05 1188 @@ -66,8 +66,9 @@ #define G_ZCONSGAP 45 #define G_ZCONSFIXTIME 46 #define G_ZCONSUSINGSMD 47 -#define G_THERM_INT_LAMBDA 48 -#define G_THERM_INT_K 49 +#define G_USE_THERM_INT 48 +#define G_THERM_INT_LAMBDA 49 +#define G_THERM_INT_K 50 Globals::Globals(){ @@ -130,8 +131,9 @@ Globals::Globals(){ addHash( "zconsGap", G_ZCONSGAP); addHash( "zconsFixtime", G_ZCONSFIXTIME); addHash( "zconsUsingSMD", G_ZCONSUSINGSMD); + addHash( "useThermInt", G_USE_THERM_INT); addHash( "thermodynamicIntegrationLambda", G_THERM_INT_LAMBDA); - addHash( "thermodynamicIntegrationK", G_THERM_INT_K); + addHash( "thermodynamicIntegrationK", G_THERM_INT_K); strcpy( mixingRule,"standard"); //default mixing rules to standard. usePBC = 1; //default periodic boundry conditions to on @@ -139,6 +141,7 @@ Globals::Globals(){ useInitTime = 0; // default to pull init time from the init file useInitXSstate = 0; // default to pull the extended state from the init file orthoBoxTolerance = 1E-6; + useThermInt = 0; // default thermodynamic integration to off have_force_field = 0; have_n_components = 0; @@ -184,6 +187,8 @@ Globals::Globals(){ have_minimizer_gtol = 0; have_minimizer_ls_tol = 0; have_minimizer_ls_maxiteration = 0; + have_thermodynamic_integration_lambda = 0; + have_thermodynamic_integration_k = 0; } @@ -1575,6 +1580,24 @@ int Globals::globalAssign( event* the_event ){ } break; + case G_USE_THERM_INT: + if( the_type == STRING ){ + + if( !strcasecmp( "true", the_event->evt.asmt.rhs.sval )) useThermInt = 1; + else if( !strcasecmp( "false", the_event->evt.asmt.rhs.sval )) useThermInt = 0; + else{ + the_event->err_msg = + strdup( "Global error. useThermInt was not \"true\" or \"false\".\n" ); + return 0; + } + return 1; + } + + the_event->err_msg = + strdup( "Global error. useThermInt was not \"true\" or \"false\".\n" ); + return 0; + break; + case G_THERM_INT_LAMBDA: switch( the_type ){