| 83 |
|
#define G_THERMALTIME 21 |
| 84 |
|
#define G_USEPBC 22 |
| 85 |
|
#define G_MIXINGRULE 23 |
| 86 |
< |
#define G_USERF 24 |
| 87 |
< |
#define G_TARGETPRESSURE 25 |
| 88 |
< |
#define G_TAUTHERMOSTAT 26 |
| 89 |
< |
#define G_TAUBAROSTAT 27 |
| 90 |
< |
#define G_ZCONSTIME 28 |
| 91 |
< |
#define G_NZCONSTRAINTS 29 |
| 92 |
< |
#define G_ZCONSTOL 30 |
| 93 |
< |
#define G_ZCONSFORCEPOLICY 31 |
| 94 |
< |
#define G_SEED 32 |
| 95 |
< |
#define G_RESETTIME 33 |
| 96 |
< |
#define G_USEINITTIME 34 |
| 97 |
< |
#define G_USEINIT_XS_STATE 35 |
| 98 |
< |
#define G_ORTHOBOXTOLERANCE 36 |
| 99 |
< |
#define G_MINIMIZER 37 |
| 100 |
< |
#define G_MIN_MAXITER 38 |
| 101 |
< |
#define G_MIN_WRITEFRQ 39 |
| 102 |
< |
#define G_MIN_STEPSIZE 40 |
| 103 |
< |
#define G_MIN_FTOL 41 |
| 104 |
< |
#define G_MIN_GTOL 42 |
| 105 |
< |
#define G_MIN_LSTOL 43 |
| 106 |
< |
#define G_MIN_LSMAXITER 44 |
| 107 |
< |
#define G_ZCONSGAP 45 |
| 108 |
< |
#define G_ZCONSFIXTIME 46 |
| 109 |
< |
#define G_ZCONSUSINGSMD 47 |
| 110 |
< |
#define G_USE_SOLID_THERM_INT 48 |
| 111 |
< |
#define G_USE_LIQUID_THERM_INT 49 |
| 112 |
< |
#define G_THERM_INT_LAMBDA 50 |
| 113 |
< |
#define G_THERM_INT_K 51 |
| 114 |
< |
#define G_FORCEFIELD_VARIANT 52 |
| 115 |
< |
#define G_FORCEFIELD_FILENAME 53 |
| 116 |
< |
#define G_THERM_INT_DIST_SPRING 54 |
| 117 |
< |
#define G_THERM_INT_THETA_SPRING 55 |
| 118 |
< |
#define G_THERM_INT_OMEGA_SPRING 56 |
| 119 |
< |
#define G_SURFACETENSION 57 |
| 120 |
< |
#define G_PRINTPRESSURETENSOR 58 |
| 121 |
< |
#define G_COULOMBIC_CORRECTION 59 |
| 122 |
< |
#define G_DAMPING_ALPHA 60 |
| 123 |
< |
#define G_CUTOFFPOLICY 61 |
| 86 |
> |
#define G_TARGETPRESSURE 24 |
| 87 |
> |
#define G_TAUTHERMOSTAT 25 |
| 88 |
> |
#define G_TAUBAROSTAT 26 |
| 89 |
> |
#define G_ZCONSTIME 27 |
| 90 |
> |
#define G_NZCONSTRAINTS 28 |
| 91 |
> |
#define G_ZCONSTOL 29 |
| 92 |
> |
#define G_ZCONSFORCEPOLICY 30 |
| 93 |
> |
#define G_SEED 31 |
| 94 |
> |
#define G_RESETTIME 32 |
| 95 |
> |
#define G_USEINITTIME 33 |
| 96 |
> |
#define G_USEINIT_XS_STATE 34 |
| 97 |
> |
#define G_ORTHOBOXTOLERANCE 35 |
| 98 |
> |
#define G_MINIMIZER 36 |
| 99 |
> |
#define G_MIN_MAXITER 37 |
| 100 |
> |
#define G_MIN_WRITEFRQ 38 |
| 101 |
> |
#define G_MIN_STEPSIZE 39 |
| 102 |
> |
#define G_MIN_FTOL 40 |
| 103 |
> |
#define G_MIN_GTOL 41 |
| 104 |
> |
#define G_MIN_LSTOL 42 |
| 105 |
> |
#define G_MIN_LSMAXITER 43 |
| 106 |
> |
#define G_ZCONSGAP 44 |
| 107 |
> |
#define G_ZCONSFIXTIME 45 |
| 108 |
> |
#define G_ZCONSUSINGSMD 46 |
| 109 |
> |
#define G_USE_SOLID_THERM_INT 47 |
| 110 |
> |
#define G_USE_LIQUID_THERM_INT 48 |
| 111 |
> |
#define G_THERM_INT_LAMBDA 49 |
| 112 |
> |
#define G_THERM_INT_K 50 |
| 113 |
> |
#define G_FORCEFIELD_VARIANT 51 |
| 114 |
> |
#define G_FORCEFIELD_FILENAME 52 |
| 115 |
> |
#define G_THERM_INT_DIST_SPRING 53 |
| 116 |
> |
#define G_THERM_INT_THETA_SPRING 54 |
| 117 |
> |
#define G_THERM_INT_OMEGA_SPRING 55 |
| 118 |
> |
#define G_SURFACETENSION 56 |
| 119 |
> |
#define G_PRINTPRESSURETENSOR 57 |
| 120 |
> |
#define G_ELECTRO_SUM_METHOD 58 |
| 121 |
> |
#define G_DAMPING_ALPHA 59 |
| 122 |
> |
#define G_CUTOFFPOLICY 60 |
| 123 |
|
|
| 124 |
|
Globals::Globals(){ |
| 125 |
|
initalize(); |
| 162 |
|
command_table.insert(CommandMapType::value_type("thermalTime", G_THERMALTIME)); |
| 163 |
|
command_table.insert(CommandMapType::value_type("mixingRule", G_MIXINGRULE)); |
| 164 |
|
command_table.insert(CommandMapType::value_type("usePeriodicBoundaryConditions", G_USEPBC)); |
| 166 |
– |
command_table.insert(CommandMapType::value_type("useReactionField", G_USERF)); |
| 165 |
|
command_table.insert(CommandMapType::value_type("targetPressure", G_TARGETPRESSURE)); |
| 166 |
|
command_table.insert(CommandMapType::value_type("tauThermostat", G_TAUTHERMOSTAT)); |
| 167 |
|
command_table.insert(CommandMapType::value_type("tauBarostat", G_TAUBAROSTAT)); |
| 195 |
|
command_table.insert(CommandMapType::value_type("thermIntOmegaSpringConst", G_THERM_INT_OMEGA_SPRING)); |
| 196 |
|
command_table.insert(CommandMapType::value_type("surfaceTension", G_SURFACETENSION)); |
| 197 |
|
command_table.insert(CommandMapType::value_type("printPressureTensor", G_PRINTPRESSURETENSOR)); |
| 198 |
< |
command_table.insert(CommandMapType::value_type("coulombicCorrection", G_COULOMBIC_CORRECTION)); |
| 198 |
> |
command_table.insert(CommandMapType::value_type("electrostaticSummationMethod", G_ELECTRO_SUM_METHOD)); |
| 199 |
|
command_table.insert(CommandMapType::value_type("dampingAlpha", G_DAMPING_ALPHA)); |
| 200 |
|
command_table.insert(CommandMapType::value_type("cutoffPolicy", G_CUTOFFPOLICY)); |
| 201 |
|
|
| 202 |
|
strcpy( mixingRule,"standard"); //default mixing rules to standard. |
| 203 |
|
usePBC = 1; //default periodic boundry conditions to on |
| 206 |
– |
useRF = 0; |
| 204 |
|
useInitTime = 0; // default to pull init time from the init file |
| 205 |
|
useInitXSstate = 0; // default to pull the extended state from the init file |
| 206 |
|
orthoBoxTolerance = 1E-6; |
| 261 |
|
have_omega_spring_constant = 0; |
| 262 |
|
have_surface_tension = 0; |
| 263 |
|
have_print_pressure_tensor = 0; |
| 264 |
< |
have_coulombic_correction = 0; |
| 264 |
> |
have_electro_sum_method = 0; |
| 265 |
|
have_damping_alpha = 0; |
| 266 |
|
have_cutoff_policy = 0; |
| 267 |
|
} |
| 1091 |
|
|
| 1092 |
|
the_event->err_msg = |
| 1093 |
|
strdup( "Error in parsing meta-data file!\n\tusePeriodicBoundaryConditions was not \"true\" or \"false\".\n" ); |
| 1097 |
– |
return 0; |
| 1098 |
– |
break; |
| 1099 |
– |
|
| 1100 |
– |
case G_USERF: |
| 1101 |
– |
if( the_type == STRING ){ |
| 1102 |
– |
|
| 1103 |
– |
if( !strcasecmp( "true", the_event->evt.asmt.rhs.sval )) useRF = 1; |
| 1104 |
– |
else if( !strcasecmp( "false", the_event->evt.asmt.rhs.sval )) useRF = 0; |
| 1105 |
– |
else{ |
| 1106 |
– |
the_event->err_msg = |
| 1107 |
– |
strdup( "Error in parsing meta-data file!\n\tuseReactionField was not \"true\" or \"false\".\n" ); |
| 1108 |
– |
return 0; |
| 1109 |
– |
} |
| 1110 |
– |
return 1; |
| 1111 |
– |
} |
| 1112 |
– |
|
| 1113 |
– |
the_event->err_msg = |
| 1114 |
– |
strdup( "Error in parsing meta-data file!\n\tuseReactionField was not \"true\" or \"false\".\n" ); |
| 1094 |
|
return 0; |
| 1095 |
|
break; |
| 1096 |
|
|
| 1884 |
|
return 0; |
| 1885 |
|
break; |
| 1886 |
|
|
| 1887 |
< |
case G_COULOMBIC_CORRECTION: |
| 1887 |
> |
case G_ELECTRO_SUM_METHOD: |
| 1888 |
|
switch( the_type ){ |
| 1889 |
|
|
| 1890 |
|
case STRING: |
| 1891 |
< |
strcpy(coulombicCorrection, the_event->evt.asmt.rhs.sval); |
| 1891 |
> |
strcpy(electrostaticSummationMethod, the_event->evt.asmt.rhs.sval); |
| 1892 |
|
|
| 1893 |
< |
for(int i = 0; coulombicCorrection[i] != '\0'; i++) |
| 1893 |
> |
for(int i = 0; electrostaticSummationMethod[i] != '\0'; i++) |
| 1894 |
|
{ |
| 1895 |
< |
coulombicCorrection[i] = toupper(coulombicCorrection[i]); |
| 1895 |
> |
electrostaticSummationMethod[i] = toupper(electrostaticSummationMethod[i]); |
| 1896 |
|
} |
| 1897 |
< |
have_coulombic_correction = 1; |
| 1897 |
> |
have_electro_sum_method = 1; |
| 1898 |
|
return 1; |
| 1899 |
|
break; |
| 1900 |
|
|
| 1901 |
|
case DOUBLE: |
| 1902 |
|
the_event->err_msg = |
| 1903 |
< |
strdup( "Error in parsing meta-data file!\n\tcoulombicCorrection should be a string!\n" ); |
| 1903 |
> |
strdup( "Error in parsing meta-data file!\n\telectrostaticSummationMethod should be a string!\n" ); |
| 1904 |
|
return 0; |
| 1905 |
|
break; |
| 1906 |
|
|
| 1907 |
|
case INT: |
| 1908 |
|
the_event->err_msg = |
| 1909 |
< |
strdup( "Error in parsing meta-data file!\n\tcoulombicCorrection should be a string!\n" ); |
| 1909 |
> |
strdup( "Error in parsing meta-data file!\n\telectrostaticSummationMethod should be a string!\n" ); |
| 1910 |
|
return 0; |
| 1911 |
|
break; |
| 1912 |
|
|
| 1913 |
|
default: |
| 1914 |
|
the_event->err_msg = |
| 1915 |
< |
strdup( "Error in parsing meta-data file!\n\tcoulombicCorrection unrecognized.\n" ); |
| 1915 |
> |
strdup( "Error in parsing meta-data file!\n\telectrostaticSummationMethod unrecognized.\n" ); |
| 1916 |
|
return 0; |
| 1917 |
|
break; |
| 1918 |
|
} |