--- trunk/OOPSE/libBASS/Globals.cpp 2004/05/20 20:24:07 1180 +++ trunk/OOPSE/libBASS/Globals.cpp 2004/05/20 20:27:26 1181 @@ -66,6 +66,8 @@ #define G_ZCONSGAP 45 #define G_ZCONSFIXTIME 46 #define G_ZCONSUSINGSMD 47 +#define G_THERM_INT_LAMBDA 48 +#define G_THERM_INT_K 49 Globals::Globals(){ @@ -128,6 +130,8 @@ Globals::Globals(){ addHash( "zconsGap", G_ZCONSGAP); addHash( "zconsFixtime", G_ZCONSFIXTIME); addHash( "zconsUsingSMD", G_ZCONSUSINGSMD); + addHash( "thermodynamicIntegrationLambda", G_THERM_INT_LAMBDA); + addHash( "thermodynamicIntegrationK", G_THERM_INT_K); strcpy( mixingRule,"standard"); //default mixing rules to standard. usePBC = 1; //default periodic boundry conditions to on @@ -1570,6 +1574,64 @@ int Globals::globalAssign( event* the_event ){ break; } break; + + case G_THERM_INT_LAMBDA: + switch( the_type ){ + + case STRING: + the_event->err_msg = + strdup( "Global error. thermodynamicIntegrationLambda is not a double or int.\n" ); + return 1; + break; + + case DOUBLE: + thermodynamic_integration_lambda = the_event->evt.asmt.rhs.dval; + have_thermodynamic_integration_lambda = 1; + return 1; + break; + + case INT: + thermodynamic_integration_lambda = (double)the_event->evt.asmt.rhs.dval; + have_thermodynamic_integration_lambda = 1; + return 1; + break; + + default: + the_event->err_msg = + strdup( "Global error. thermodynamicIntegrationLambda unrecognized.\n" ); + return 0; + break; + } + break; + + case G_THERM_INT_K: + switch( the_type ){ + + case STRING: + the_event->err_msg = + strdup( "Global error. thermodynamicIntegrationK is not a double or int.\n" ); + return 1; + break; + + case DOUBLE: + thermodynamic_integration_k = the_event->evt.asmt.rhs.dval; + have_thermodynamic_integration_k = 1; + return 1; + break; + + case INT: + thermodynamic_integration_k = (double)the_event->evt.asmt.rhs.dval; + have_thermodynamic_integration_k = 1; + return 1; + break; + + default: + the_event->err_msg = + strdup( "Global error. thermodynamicIntegrationK unrecognized.\n" ); + return 0; + break; + } + break; // add more token cases here. }