| 80 |
|
|
| 81 |
|
if( !strcmp( info.name, name ) ){ |
| 82 |
|
sprintf( painCave.errMsg, |
| 83 |
< |
"Duplicate LJ atom type \"%s\" found in " |
| 84 |
< |
"the LJ_FF param file./n", |
| 83 |
> |
"Duplicate EAM atom type \"%s\" found in " |
| 84 |
> |
"the EAM_FF param file./n", |
| 85 |
|
name ); |
| 86 |
|
painCave.isFatal = 1; |
| 87 |
|
simError(); |
| 155 |
|
// begins the actual forcefield stuff. |
| 156 |
|
//**************************************************************** |
| 157 |
|
|
| 158 |
+ |
EAM_FF::EAM_FF() { |
| 159 |
+ |
EAM_FF(""); |
| 160 |
+ |
} |
| 161 |
|
|
| 162 |
< |
EAM_FF::EAM_FF(){ |
| 162 |
> |
EAM_FF::EAM_FF(char* the_variant){ |
| 163 |
|
|
| 164 |
|
char fileName[200]; |
| 165 |
|
char* ffPath_env = "FORCE_PARAM_PATH"; |
| 204 |
|
if( worldRank == 0 ){ |
| 205 |
|
#endif |
| 206 |
|
|
| 207 |
< |
// generate the force file name |
| 208 |
< |
|
| 209 |
< |
strcpy( fileName, "EAM_FF.frc" ); |
| 210 |
< |
// fprintf( stderr,"Trying to open %s\n", fileName ); |
| 207 |
> |
// generate the force file name |
| 208 |
> |
|
| 209 |
> |
strcpy( fileName, "EAM" ); |
| 210 |
> |
|
| 211 |
> |
if (strlen(the_variant) > 0) { |
| 212 |
> |
has_variant = 1; |
| 213 |
> |
strcpy( variant, the_variant); |
| 214 |
> |
strcat( fileName, "."); |
| 215 |
> |
strcat( fileName, variant ); |
| 216 |
> |
|
| 217 |
> |
sprintf( painCave.errMsg, |
| 218 |
> |
"Using %s variant of EAM force field.\n", |
| 219 |
> |
variant ); |
| 220 |
> |
painCave.severity = OOPSE_INFO; |
| 221 |
> |
painCave.isFatal = 0; |
| 222 |
> |
simError(); |
| 223 |
> |
} |
| 224 |
> |
strcat( fileName, ".frc"); |
| 225 |
> |
|
| 226 |
> |
//fprintf( stderr,"Trying to open %s\n", fileName ); |
| 227 |
|
|
| 228 |
|
// attempt to open the file in the current directory first. |
| 229 |
|
|
| 247 |
|
frcFile = fopen( fileName, "r" ); |
| 248 |
|
|
| 249 |
|
if( frcFile == NULL ){ |
| 250 |
< |
|
| 250 |
> |
|
| 251 |
|
sprintf( painCave.errMsg, |
| 252 |
|
"Error opening the force field parameter file:\n" |
| 253 |
|
"\t%s\n" |
| 259 |
|
simError(); |
| 260 |
|
} |
| 261 |
|
} |
| 262 |
+ |
|
| 263 |
|
|
| 264 |
|
#ifdef IS_MPI |
| 265 |
|
} |
| 339 |
|
// read in the atom types. |
| 340 |
|
|
| 341 |
|
headAtomType = new LinkedAtomType; |
| 342 |
< |
|
| 342 |
> |
|
| 343 |
|
fastForward( "AtomTypes", "eam atom readParams" ); |
| 344 |
|
|
| 345 |
|
// we are now at the AtomTypes section. |