302 |
|
|
303 |
|
} |
304 |
|
|
305 |
+ |
void TraPPE_ExFF::initForceField( int ljMixRule ){ |
306 |
+ |
|
307 |
+ |
initFortran( ljMixRule, entry_plug->useReactionField ); |
308 |
+ |
} |
309 |
|
|
310 |
+ |
|
311 |
|
void TraPPE_ExFF::initializeAtoms( void ){ |
312 |
|
|
313 |
|
class LinkedType { |
399 |
|
int nAtoms; |
400 |
|
the_atoms = entry_plug->atoms; |
401 |
|
nAtoms = entry_plug->n_atoms; |
402 |
< |
|
402 |
> |
useReactionField = 0; |
403 |
|
|
404 |
|
////////////////////////////////////////////////// |
405 |
|
// a quick water fix |
538 |
|
|
539 |
|
int isGB = 0; |
540 |
|
int isLJ = 1; |
541 |
+ |
double GB_dummy = 0.0; |
542 |
|
|
543 |
|
|
544 |
|
currentAtomType = headAtomType; |
545 |
|
while( currentAtomType != NULL ){ |
546 |
|
|
547 |
+ |
if(currentAtomType->isDipole) entry_plug->useReactionField = 1; |
548 |
+ |
if(currentAtomType->isDipole) entry_plug->useDipole = 1; |
549 |
+ |
if(currentAtomType->isSSD) entry_plug->useSticky = 1; |
550 |
+ |
|
551 |
|
if( currentAtomType->name[0] != '\0' ){ |
552 |
|
isError = 0; |
553 |
< |
newTPEtype( &(currentAtomType->ident), |
554 |
< |
&(currentAtomType->mass), |
555 |
< |
&(currentAtomType->epslon), |
556 |
< |
&(currentAtomType->sigma), |
557 |
< |
&isLJ, |
558 |
< |
&(currentAtomType->isSSD), |
559 |
< |
&(currentAtomType->isDipole), |
560 |
< |
&isGB, |
561 |
< |
&(currentAtomType->w0), |
562 |
< |
&(currentAtomType->v0), |
563 |
< |
&(currentAtomType->dipole), |
564 |
< |
&isError ); |
553 |
> |
makeAtype( &(currentAtomType->ident), |
554 |
> |
&isLJ, |
555 |
> |
&(currentAtomType->isSSD), |
556 |
> |
&(currentAtomType->isDipole), |
557 |
> |
&isGB, |
558 |
> |
&(currentAtomType->epslon), |
559 |
> |
&(currentAtomType->sigma), |
560 |
> |
&(currentAtomType->dipole), |
561 |
> |
&(currentAtomType->w0), |
562 |
> |
&(currentAtomType->v0), |
563 |
> |
&GB_dummy, |
564 |
> |
&GB_dummy, |
565 |
> |
&GB_dummy, |
566 |
> |
&GB_dummy, |
567 |
> |
&GB_dummy, |
568 |
> |
&GB_dummy, |
569 |
> |
&isError ); |
570 |
|
if( isError ){ |
571 |
|
sprintf( painCave.errMsg, |
572 |
|
"Error initializing the \"%s\" atom type in fortran\n", |
677 |
|
|
678 |
|
entry_plug->rList = entry_plug->rCut + 1.0; |
679 |
|
|
680 |
+ |
entry_plug->useLJ = 1; // use Lennard Jones is on by default |
681 |
|
|
682 |
|
// clean up the memory |
683 |
|
|
687 |
|
sprintf( checkPointMsg, "TraPPE_Ex atoms initialized succesfully" ); |
688 |
|
MPIcheckPoint(); |
689 |
|
#endif // is_mpi |
674 |
– |
|
675 |
– |
initFortran(); |
676 |
– |
entry_plug->refreshSim(); |
690 |
|
|
691 |
|
} |
692 |
|
|