| 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/lj_interface.h" |
| 17 |
|
|
| 16 |
– |
#include "fortranWrappers.hpp" |
| 18 |
|
|
| 19 |
|
#ifdef IS_MPI |
| 20 |
< |
#include "mpiForceField.h" |
| 20 |
> |
#include "UseTheForce/mpiForceField.h" |
| 21 |
|
#endif // is_mpi |
| 22 |
|
|
| 23 |
|
|
| 129 |
|
currentAtomType = NULL; |
| 130 |
|
|
| 131 |
|
// do the funtion wrapping |
| 132 |
< |
wrapMeFF( this ); |
| 132 |
> |
// wrapMeFF( this ); |
| 133 |
|
|
| 134 |
|
#ifdef IS_MPI |
| 135 |
|
int i; |
| 225 |
|
#endif // is_mpi |
| 226 |
|
} |
| 227 |
|
|
| 228 |
< |
void LJFF::initForceField( int ljMixRule ){ |
| 228 |
> |
void LJFF::initForceField(){ |
| 229 |
|
|
| 230 |
< |
initFortran( ljMixRule, 0 ); |
| 230 |
> |
initFortran(0); |
| 231 |
|
} |
| 232 |
|
|
| 233 |
|
void LJFF::cleanMe( void ){ |
| 252 |
|
// if things go well, last will be set to 0 |
| 253 |
|
|
| 254 |
|
int identNum; |
| 255 |
< |
|
| 255 |
> |
int isError; |
| 256 |
|
|
| 257 |
|
bigSigma = 0.0; |
| 258 |
|
#ifdef IS_MPI |
| 348 |
|
} |
| 349 |
|
} |
| 350 |
|
#endif // is_mpi |
| 350 |
– |
|
| 351 |
– |
// call new A_types in fortran |
| 351 |
|
|
| 352 |
< |
int isError; |
| 352 |
> |
currentAtomType = headAtomType; |
| 353 |
> |
while( currentAtomType != NULL ){ |
| 354 |
> |
|
| 355 |
> |
if( currentAtomType->name[0] != '\0' ){ |
| 356 |
|
|
| 357 |
< |
// dummy variables |
| 358 |
< |
int isLJ = 1; |
| 359 |
< |
int isDipole = 0; |
| 360 |
< |
int isSSD = 0; |
| 361 |
< |
int isGB = 0; |
| 362 |
< |
int isEAM = 0; |
| 363 |
< |
int isCharge = 0; |
| 364 |
< |
double charge = 0.0; |
| 365 |
< |
double dipole = 0.0; |
| 366 |
< |
|
| 357 |
> |
AtomType* at = new AtomType(); |
| 358 |
> |
at->setIdent(currentAtomType->ident); |
| 359 |
> |
printf ("currentName = %s\n", currentAtomType->name); |
| 360 |
> |
at->setName(currentAtomType->name); |
| 361 |
> |
at->setLennardJones(); |
| 362 |
> |
at->complete(); |
| 363 |
> |
|
| 364 |
> |
} |
| 365 |
> |
currentAtomType = currentAtomType->next; |
| 366 |
> |
} |
| 367 |
> |
|
| 368 |
|
currentAtomType = headAtomType; |
| 369 |
|
while( currentAtomType != NULL ){ |
| 370 |
|
|
| 371 |
|
if( currentAtomType->name[0] != '\0' ){ |
| 372 |
|
isError = 0; |
| 373 |
< |
makeAtype( &(currentAtomType->ident), |
| 374 |
< |
&isLJ, |
| 372 |
< |
&isSSD, |
| 373 |
< |
&isDipole, |
| 374 |
< |
&isGB, |
| 375 |
< |
&isEAM, |
| 376 |
< |
&isCharge, |
| 377 |
< |
&(currentAtomType->epslon), |
| 378 |
< |
&(currentAtomType->sigma), |
| 379 |
< |
&charge, |
| 380 |
< |
&dipole, |
| 381 |
< |
&isError ); |
| 373 |
> |
newLJtype( &(currentAtomType->ident), &(currentAtomType->sigma), |
| 374 |
> |
&(currentAtomType->epslon), &isError); |
| 375 |
|
if( isError ){ |
| 376 |
< |
sprintf( painCave.errMsg, |
| 377 |
< |
"Error initializing the \"%s\" atom type in fortran\n", |
| 378 |
< |
currentAtomType->name ); |
| 379 |
< |
painCave.isFatal = 1; |
| 380 |
< |
simError(); |
| 376 |
> |
sprintf( painCave.errMsg, |
| 377 |
> |
"Error initializing the \"%s\" LJ type in fortran\n", |
| 378 |
> |
currentAtomType->name ); |
| 379 |
> |
painCave.isFatal = 1; |
| 380 |
> |
simError(); |
| 381 |
|
} |
| 382 |
|
} |
| 383 |
+ |
|
| 384 |
|
currentAtomType = currentAtomType->next; |
| 385 |
|
} |
| 386 |
< |
|
| 387 |
< |
entry_plug->useLJ = 1; |
| 386 |
> |
|
| 387 |
> |
entry_plug->useLennardJones = 1; |
| 388 |
|
|
| 389 |
|
#ifdef IS_MPI |
| 390 |
|
sprintf( checkPointMsg, |