12 |
|
#include "UseTheForce/ForceFields.hpp" |
13 |
|
#include "primitives/SRI.hpp" |
14 |
|
#include "utils/simError.h" |
15 |
+ |
#include "types/AtomType.hpp" |
16 |
|
#include "types/DirectionalAtomType.hpp" |
17 |
|
#include "UseTheForce/DarkSide/lj_interface.h" |
18 |
|
#include "UseTheForce/DarkSide/charge_interface.h" |
396 |
|
atomStruct atomInfo; |
397 |
|
directionalStruct directionalInfo; |
398 |
|
fpos_t *atomPos; |
398 |
– |
|
399 |
|
AtomType* at; |
400 |
|
|
401 |
|
atomInfo.last = 1; // initialize last to have the last set. |
544 |
|
while( currentAtomType != NULL ){ |
545 |
|
if( currentAtomType->name[0] != '\0' ){ |
546 |
|
if (currentAtomType->isDirectional) |
547 |
< |
DirectionalAtomType* at = new DirectionalAtomType(); |
547 |
> |
at = new DirectionalAtomType(); |
548 |
|
else |
549 |
< |
AtomType* at = new AtomType(); |
550 |
< |
|
549 |
> |
at = new AtomType(); |
550 |
> |
|
551 |
|
if (currentAtomType->isLJ) { |
552 |
|
at->setLennardJones(); |
553 |
|
} |
557 |
|
} |
558 |
|
|
559 |
|
if (currentAtomType->isDirectional) { |
560 |
< |
if (currentDirectionalType->isSticky) { |
560 |
> |
if (currentDirectionalType->isDipole) { |
561 |
|
((DirectionalAtomType*)at)->setDipole(); |
562 |
– |
entry_plug->useDipoles = 1; |
562 |
|
} |
563 |
|
|
564 |
|
if (currentDirectionalType->isSticky) { |
565 |
|
((DirectionalAtomType*)at)->setSticky(); |
567 |
– |
entry_plug->useSticky = 1; |
566 |
|
} |
567 |
|
} |
568 |
|
|
661 |
|
the_atoms[i]->setMass( currentAtomType->mass ); |
662 |
|
the_atoms[i]->setIdent( currentAtomType->ident ); |
663 |
|
|
664 |
+ |
if (currentAtomType->isLJ) entry_plug->useLennardJones = 1; |
665 |
+ |
if (currentAtomType->isCharge) entry_plug->useCharges = 1; |
666 |
+ |
if (currentAtomType->isDirectional) { |
667 |
+ |
if (currentDirectionalType->isDipole) entry_plug->useDipoles = 1; |
668 |
+ |
if (currentDirectionalType->isSticky) entry_plug->useSticky = 1; |
669 |
+ |
} |
670 |
+ |
|
671 |
|
if( bigSigma < currentAtomType->sigma ) bigSigma = currentAtomType->sigma; |
672 |
|
|
673 |
|
the_atoms[i]->setHasCharge(currentAtomType->isCharge); |