ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/UseTheForce/WATER.cpp
(Generate patch)

Comparing trunk/src/UseTheForce/WATER.cpp (file contents):
Revision 161 by gezelter, Wed Oct 27 02:16:34 2004 UTC vs.
Revision 202 by gezelter, Thu Nov 4 16:20:28 2004 UTC

# Line 12 | Line 12 | using namespace std;
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"
# Line 395 | Line 396 | void WATER::readParams( void ){
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.
# Line 544 | Line 544 | void WATER::readParams( void ){
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        }
# Line 557 | Line 557 | void WATER::readParams( void ){
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        
# Line 663 | Line 661 | void WATER::initializeAtoms( int nAtoms, Atom** the_at
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);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines