| 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 |
|
|
| 578 |
|
|
| 579 |
|
while( currentAtomType != NULL ){ |
| 580 |
|
|
| 581 |
+ |
currentDirectionalType = headDirectionalType->find(currentAtomType->name); |
| 582 |
+ |
|
| 583 |
|
if( currentAtomType->isLJ ){ |
| 584 |
|
isError = 0; |
| 585 |
|
newLJtype( &(currentAtomType->ident), &(currentAtomType->sigma), |
| 660 |
|
painCave.isFatal = 1; |
| 661 |
|
simError(); |
| 662 |
|
} |
| 663 |
– |
the_atoms[i]->setMass( currentAtomType->mass ); |
| 664 |
– |
the_atoms[i]->setIdent( currentAtomType->ident ); |
| 665 |
– |
|
| 666 |
– |
if( bigSigma < currentAtomType->sigma ) bigSigma = currentAtomType->sigma; |
| 667 |
– |
|
| 668 |
– |
the_atoms[i]->setHasCharge(currentAtomType->isCharge); |
| 663 |
|
|
| 664 |
|
if( currentAtomType->isDirectional ){ |
| 665 |
|
currentDirectionalType = |
| 672 |
|
simError(); |
| 673 |
|
} |
| 674 |
|
|
| 675 |
+ |
the_atoms[i]->setMass( currentAtomType->mass ); |
| 676 |
+ |
the_atoms[i]->setIdent( currentAtomType->ident ); |
| 677 |
+ |
|
| 678 |
+ |
if (currentAtomType->isLJ) entry_plug->useLennardJones = 1; |
| 679 |
+ |
if (currentAtomType->isCharge) entry_plug->useCharges = 1; |
| 680 |
+ |
if (currentAtomType->isDirectional) { |
| 681 |
+ |
if (currentDirectionalType->isDipole) entry_plug->useDipoles = 1; |
| 682 |
+ |
if (currentDirectionalType->isSticky) entry_plug->useSticky = 1; |
| 683 |
+ |
} |
| 684 |
+ |
|
| 685 |
+ |
if( bigSigma < currentAtomType->sigma ) bigSigma = currentAtomType->sigma; |
| 686 |
+ |
|
| 687 |
+ |
the_atoms[i]->setHasCharge(currentAtomType->isCharge); |
| 688 |
+ |
|
| 689 |
+ |
|
| 690 |
+ |
|
| 691 |
|
// zero out the moments of inertia matrix |
| 692 |
|
for( j=0; j<3; j++ ) |
| 693 |
|
for( k=0; k<3; k++ ) |