12 |
|
#include "UseTheForce/ForceFields.hpp" |
13 |
|
#include "primitives/SRI.hpp" |
14 |
|
#include "utils/simError.h" |
15 |
< |
#include "UseTheForce/DarkSide/atype_interface.h" |
15 |
> |
#include "types/AtomType.hpp" |
16 |
> |
#include "UseTheForce/DarkSide/lj_interface.h" |
17 |
|
|
17 |
– |
//#include "UseTheForce/fortranWrappers.hpp" |
18 |
|
|
19 |
|
#ifdef IS_MPI |
20 |
|
#include "UseTheForce/mpiForceField.h" |
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 |
351 |
– |
|
352 |
– |
// 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 |
> |
at->setName(currentAtomType->name); |
360 |
> |
at->setLennardJones(); |
361 |
> |
at->complete(); |
362 |
> |
|
363 |
> |
} |
364 |
> |
currentAtomType = currentAtomType->next; |
365 |
> |
} |
366 |
> |
|
367 |
|
currentAtomType = headAtomType; |
368 |
|
while( currentAtomType != NULL ){ |
369 |
|
|
370 |
|
if( currentAtomType->name[0] != '\0' ){ |
371 |
|
isError = 0; |
372 |
< |
makeAtype( &(currentAtomType->ident), |
373 |
< |
&isLJ, |
373 |
< |
&isSSD, |
374 |
< |
&isDipole, |
375 |
< |
&isGB, |
376 |
< |
&isEAM, |
377 |
< |
&isCharge, |
378 |
< |
&(currentAtomType->epslon), |
379 |
< |
&(currentAtomType->sigma), |
380 |
< |
&charge, |
381 |
< |
&dipole, |
382 |
< |
&isError ); |
372 |
> |
newLJtype( &(currentAtomType->ident), &(currentAtomType->sigma), |
373 |
> |
&(currentAtomType->epslon), &isError); |
374 |
|
if( isError ){ |
375 |
< |
sprintf( painCave.errMsg, |
376 |
< |
"Error initializing the \"%s\" atom type in fortran\n", |
377 |
< |
currentAtomType->name ); |
378 |
< |
painCave.isFatal = 1; |
379 |
< |
simError(); |
375 |
> |
sprintf( painCave.errMsg, |
376 |
> |
"Error initializing the \"%s\" LJ type in fortran\n", |
377 |
> |
currentAtomType->name ); |
378 |
> |
painCave.isFatal = 1; |
379 |
> |
simError(); |
380 |
|
} |
381 |
|
} |
382 |
+ |
|
383 |
|
currentAtomType = currentAtomType->next; |
384 |
|
} |
385 |
< |
|
385 |
> |
|
386 |
|
entry_plug->useLJ = 1; |
387 |
|
|
388 |
|
#ifdef IS_MPI |