62 |
|
|
63 |
|
public: |
64 |
|
ForceFields(){ |
65 |
+ |
|
66 |
+ |
char* force_param_path; |
67 |
|
frcFile = NULL; |
68 |
|
entry_plug = NULL; |
69 |
|
has_variant=0; |
70 |
< |
ffPath_env = "FORCE_PARAM_PATH"; |
71 |
< |
ffPath = getenv( ffPath_env ); |
72 |
< |
if( ffPath == NULL ) { |
70 |
> |
|
71 |
> |
force_param_path = getenv("FORCE_PARAM_PATH"); |
72 |
> |
if (force_param_path != NULL) { |
73 |
> |
ffPath = force_param_path; |
74 |
> |
} else { |
75 |
> |
ffPath = ""; |
76 |
> |
} |
77 |
> |
|
78 |
> |
if( ffPath.empty() ) { |
79 |
|
STR_DEFINE(ffPath, FRC_PATH ); |
80 |
|
} |
81 |
|
} |
82 |
< |
ForceFields(char * theVariant){ |
82 |
> |
ForceFields(const string &theVariant){ |
83 |
> |
char* force_param_path; |
84 |
|
frcFile = NULL; |
85 |
|
entry_plug = NULL; |
86 |
|
has_variant=1; |
87 |
< |
strcpy(variant, theVariant); |
88 |
< |
ffPath_env = "FORCE_PARAM_PATH"; |
89 |
< |
ffPath = getenv( ffPath_env ); |
90 |
< |
if( ffPath == NULL ) { |
87 |
> |
variant = theVariant; |
88 |
> |
|
89 |
> |
force_param_path = getenv("FORCE_PARAM_PATH"); |
90 |
> |
if (force_param_path != NULL) { |
91 |
> |
ffPath = force_param_path; |
92 |
> |
} else { |
93 |
> |
ffPath = ""; |
94 |
> |
} |
95 |
> |
|
96 |
> |
if( ffPath.empty() ) { |
97 |
|
STR_DEFINE(ffPath, FRC_PATH ); |
98 |
|
} |
99 |
|
} |
131 |
|
int lineNum; |
132 |
|
char readLine[500]; |
133 |
|
char* eof_test; |
119 |
– |
char variant[100]; |
134 |
|
short int has_variant; |
135 |
|
double bigSigma; |
136 |
|
|
137 |
+ |
string ffPath; |
138 |
|
ifstrstream forceFile; |
139 |
+ |
bool hasVariant; |
140 |
+ |
string variant; |
141 |
|
map<string, AtomType*> atomTypeMap; |
142 |
< |
char* ffPath_env; |
143 |
< |
char* ffPath; |
142 |
> |
// map<pair<string,string>, BondType*> bondTypeMap; |
143 |
> |
// map<tuple3<string,string,string>, BendType*> bendTypeMap; |
144 |
> |
// map<tuple4<string,string,string,string>, TorsionType*> torsionTypeMap; |
145 |
|
|
146 |
|
}; |
147 |
|
|
200 |
|
class EAM_FF : public ForceFields{ |
201 |
|
|
202 |
|
public: |
203 |
+ |
|
204 |
|
EAM_FF(); |
205 |
< |
EAM_FF(char* the_variant); |
205 |
> |
EAM_FF(const string &theVariant); |
206 |
> |
|
207 |
|
virtual ~EAM_FF(); |
208 |
|
|
189 |
– |
|
209 |
|
void readParams(); |
210 |
|
void cleanMe( void ); |
211 |
|
|
257 |
|
|
258 |
|
public: |
259 |
|
Shapes_FF() : ForceFields() {}; |
260 |
< |
Shapes_FF(char* the_variant) : ForceFields(the_variant) {}; |
260 |
> |
Shapes_FF(const string &the_variant) : ForceFields(the_variant) {}; |
261 |
|
virtual ~Shapes_FF(); |
262 |
|
|
263 |
|
void readParams(); |