--- trunk/OOPSE/libBASS/Globals.cpp 2003/11/06 22:01:37 855 +++ trunk/OOPSE/libBASS/Globals.cpp 2004/01/19 16:08:21 957 @@ -17,44 +17,45 @@ */ //required parameters -#define G_FORCEFIELD 1 -#define G_NCOMPONENTS 2 -#define G_TARGETTEMP 3 -#define G_ENSEMBLE 4 -#define G_DT 5 -#define G_RUNTIME 6 +#define G_FORCEFIELD 1 +#define G_NCOMPONENTS 2 +#define G_TARGETTEMP 3 +#define G_ENSEMBLE 4 +#define G_DT 5 +#define G_RUNTIME 6 //optional parameters -#define G_INITIALCONFIG 7 -#define G_FINALCONFIG 8 -#define G_NMOL 9 -#define G_DENSITY 10 -#define G_BOX 11 -#define G_BOXX 12 -#define G_BOXY 13 -#define G_BOXZ 14 -#define G_SAMPLETIME 15 -#define G_STATUSTIME 16 -#define G_ECR 17 -#define G_DIELECTRIC 18 -#define G_TEMPSET 19 -#define G_THERMALTIME 20 -#define G_USEPBC 21 -#define G_MIXINGRULE 22 -#define G_EST 23 -#define G_USERF 24 -#define G_TARGETPRESSURE 25 -#define G_TAUTHERMOSTAT 26 -#define G_TAUBAROSTAT 27 -#define G_ZCONSTIME 28 -#define G_NZCONSTRAINTS 29 -#define G_ZCONSTOL 30 -#define G_ZCONSFORCEPOLICY 31 -#define G_SEED 32 -#define G_RESETTIME 33 -#define G_USEINITTIME 34 -#define G_USEINIT_XS_STATE 35 +#define G_INITIALCONFIG 7 +#define G_FINALCONFIG 8 +#define G_NMOL 9 +#define G_DENSITY 10 +#define G_BOX 11 +#define G_BOXX 12 +#define G_BOXY 13 +#define G_BOXZ 14 +#define G_SAMPLETIME 15 +#define G_STATUSTIME 16 +#define G_ECR 17 +#define G_DIELECTRIC 18 +#define G_TEMPSET 19 +#define G_THERMALTIME 20 +#define G_USEPBC 21 +#define G_MIXINGRULE 22 +#define G_EST 23 +#define G_USERF 24 +#define G_TARGETPRESSURE 25 +#define G_TAUTHERMOSTAT 26 +#define G_TAUBAROSTAT 27 +#define G_ZCONSTIME 28 +#define G_NZCONSTRAINTS 29 +#define G_ZCONSTOL 30 +#define G_ZCONSFORCEPOLICY 31 +#define G_SEED 32 +#define G_RESETTIME 33 +#define G_USEINITTIME 34 +#define G_USEINIT_XS_STATE 35 #define G_ORTHOBOXTOLERANCE 36 +#define G_LJRCUT 37 Globals::Globals(){ @@ -107,6 +108,7 @@ Globals::Globals(){ addHash( "useInitialTime", G_USEINITTIME); addHash( "useInitialExtendedSystemState", G_USEINIT_XS_STATE); addHash( "orthoBoxTolerance", G_ORTHOBOXTOLERANCE); + addHash( "LJrcut", G_LJRCUT); // define some default values @@ -151,6 +153,7 @@ Globals::Globals(){ have_zConstraints = 0; have_zcons_tol = 0; have_seed = 0; + have_ljrcut = 0; } @@ -824,6 +827,35 @@ int Globals::globalAssign( event* the_event ){ default: the_event->err_msg = strdup( "Global error. thermalTime unrecognized.\n" ); + return 0; + break; + } + break; + + case G_LJRCUT: + switch( the_type ){ + + case STRING: + the_event->err_msg = + strdup( "Global error. LJrcut is not a double or int.\n" ); + return 0; + break; + + case DOUBLE: + LJrcut = the_event->evt.asmt.rhs.dval; + have_ljrcut = 1; + return 1; + break; + + case INT: + LJrcut = (double)the_event->evt.asmt.rhs.ival; + have_ljrcut = 1; + return 1; + break; + + default: + the_event->err_msg = + strdup( "Global error. LJrcut unrecognized.\n" ); return 0; break; }