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 |
> |
printf("Did setName\n"); |
362 |
> |
at->setLennardJones(); |
363 |
> |
printf("Did setLennardJones\n"); |
364 |
> |
at->complete(); |
365 |
> |
printf("Did complete\n"); |
366 |
> |
|
367 |
> |
} |
368 |
> |
currentAtomType = currentAtomType->next; |
369 |
> |
} |
370 |
> |
|
371 |
|
currentAtomType = headAtomType; |
372 |
|
while( currentAtomType != NULL ){ |
373 |
|
|
374 |
|
if( currentAtomType->name[0] != '\0' ){ |
375 |
|
isError = 0; |
376 |
< |
makeAtype( &(currentAtomType->ident), |
377 |
< |
&isLJ, |
372 |
< |
&isSSD, |
373 |
< |
&isDipole, |
374 |
< |
&isGB, |
375 |
< |
&isEAM, |
376 |
< |
&isCharge, |
377 |
< |
&(currentAtomType->epslon), |
378 |
< |
&(currentAtomType->sigma), |
379 |
< |
&charge, |
380 |
< |
&dipole, |
381 |
< |
&isError ); |
376 |
> |
newLJtype( &(currentAtomType->ident), &(currentAtomType->sigma), |
377 |
> |
&(currentAtomType->epslon), &isError); |
378 |
|
if( isError ){ |
379 |
< |
sprintf( painCave.errMsg, |
380 |
< |
"Error initializing the \"%s\" atom type in fortran\n", |
381 |
< |
currentAtomType->name ); |
382 |
< |
painCave.isFatal = 1; |
383 |
< |
simError(); |
379 |
> |
sprintf( painCave.errMsg, |
380 |
> |
"Error initializing the \"%s\" LJ type in fortran\n", |
381 |
> |
currentAtomType->name ); |
382 |
> |
painCave.isFatal = 1; |
383 |
> |
simError(); |
384 |
|
} |
385 |
|
} |
386 |
+ |
|
387 |
|
currentAtomType = currentAtomType->next; |
388 |
|
} |
389 |
< |
|
390 |
< |
entry_plug->useLJ = 1; |
389 |
> |
|
390 |
> |
entry_plug->useLennardJones = 1; |
391 |
|
|
392 |
|
#ifdef IS_MPI |
393 |
|
sprintf( checkPointMsg, |