9 |
|
#include <mpi.h> |
10 |
|
#endif //is_mpi |
11 |
|
|
12 |
< |
#include "ForceFields.hpp" |
13 |
< |
#include "SRI.hpp" |
14 |
< |
#include "simError.h" |
12 |
> |
#include "UseTheForce/ForceFields.hpp" |
13 |
> |
#include "primitives/SRI.hpp" |
14 |
> |
#include "utils/simError.h" |
15 |
> |
#include "types/AtomType.hpp" |
16 |
> |
#include "UseTheForce/DarkSide/eam_interface.h" |
17 |
|
|
18 |
< |
#include "fortranWrappers.hpp" |
18 |
> |
//#include "UseTheForce/fortranWrappers.hpp" |
19 |
|
|
20 |
|
#ifdef IS_MPI |
21 |
< |
#include "mpiForceField.h" |
21 |
> |
#include "UseTheForce/mpiForceField.h" |
22 |
|
#endif // is_mpi |
23 |
|
|
24 |
|
|
174 |
|
// Set eamRcut to 0.0 |
175 |
|
eamRcut = 0.0; |
176 |
|
|
175 |
– |
// do the funtion wrapping |
176 |
– |
wrapMeFF( this ); |
177 |
– |
|
177 |
|
#ifdef IS_MPI |
178 |
|
int i; |
179 |
|
|
297 |
|
} |
298 |
|
|
299 |
|
|
300 |
< |
void EAM_FF::initForceField( int ljMixRule ){ |
301 |
< |
initFortran( ljMixRule, 0 ); |
300 |
> |
void EAM_FF::initForceField( ){ |
301 |
> |
initFortran(0); |
302 |
|
} |
303 |
|
|
304 |
|
void EAM_FF::cleanMe( void ){ |
328 |
|
double *eam_rhovals; // rho of r values |
329 |
|
double *eam_Frhovals; // F of rho values |
330 |
|
char eamPotFile[1000]; |
331 |
+ |
|
332 |
|
|
333 |
|
|
334 |
|
bigSigma = 0.0; |
467 |
|
int isError; |
468 |
|
|
469 |
|
// dummy variables |
470 |
– |
int isLJ = 0; |
471 |
– |
int isDipole = 0; |
472 |
– |
int isSSD = 0; |
473 |
– |
int isGB = 0; |
474 |
– |
int isEAM = 1; |
475 |
– |
int isCharge = 0; |
476 |
– |
double dipole = 0.0; |
477 |
– |
double charge = 0.0; |
478 |
– |
double eamSigma = 0.0; |
479 |
– |
double eamEpslon = 0.0; |
470 |
|
|
471 |
|
currentAtomType = headAtomType->next; |
472 |
|
while( currentAtomType != NULL ){ |
473 |
|
|
474 |
|
if( currentAtomType->name[0] != '\0' ){ |
475 |
< |
isError = 0; |
476 |
< |
makeAtype( &(currentAtomType->ident), |
477 |
< |
&isLJ, |
478 |
< |
&isSSD, |
479 |
< |
&isDipole, |
480 |
< |
&isGB, |
481 |
< |
&isEAM, |
482 |
< |
&isCharge, |
483 |
< |
&eamEpslon, |
494 |
< |
&eamSigma, |
495 |
< |
&charge, |
496 |
< |
&dipole, |
497 |
< |
&isError ); |
498 |
< |
if( isError ){ |
499 |
< |
sprintf( painCave.errMsg, |
500 |
< |
"Error initializing the \"%s\" atom type in fortran\n", |
501 |
< |
currentAtomType->name ); |
502 |
< |
painCave.isFatal = 1; |
503 |
< |
simError(); |
504 |
< |
} |
505 |
< |
} |
475 |
> |
|
476 |
> |
AtomType* at = new AtomType(); |
477 |
> |
at->setIdent(currentAtomType->ident); |
478 |
> |
at->setName(currentAtomType->name); |
479 |
> |
at->setEAM(); |
480 |
> |
at->complete(); |
481 |
> |
|
482 |
> |
} |
483 |
> |
|
484 |
|
currentAtomType = currentAtomType->next; |
485 |
|
} |
486 |
|
|
487 |
< |
entry_plug->useLJ = 0; |
487 |
> |
entry_plug->useLennardJones = 0; |
488 |
|
entry_plug->useEAM = 1; |
489 |
|
// Walk down again and send out EAM type |
490 |
|
currentAtomType = headAtomType->next; |
1064 |
|
|
1065 |
|
fclose(eamFile); |
1066 |
|
return 0; |
1089 |
– |
} |
1090 |
– |
|
1091 |
– |
double EAM_FF::getAtomTypeMass (char* atomType) { |
1092 |
– |
|
1093 |
– |
currentAtomType = headAtomType->find( atomType ); |
1094 |
– |
if( currentAtomType == NULL ){ |
1095 |
– |
sprintf( painCave.errMsg, |
1096 |
– |
"AtomType error, %s not found in force file.\n", |
1097 |
– |
atomType ); |
1098 |
– |
painCave.isFatal = 1; |
1099 |
– |
simError(); |
1100 |
– |
} |
1101 |
– |
|
1102 |
– |
return currentAtomType->mass; |
1067 |
|
} |
1104 |
– |
|