ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/WATER.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/WATER.cpp (file contents):
Revision 999 by chrisfen, Fri Jan 30 15:01:09 2004 UTC vs.
Revision 1224 by gezelter, Wed Jun 2 18:27:52 2004 UTC

# Line 338 | Line 338 | WATER::WATER(){
338        if( frcFile == NULL ){
339          
340          sprintf( painCave.errMsg,
341 <                 "Error opening the force field parameter file: %s\n"
342 <                 "Have you tried setting the FORCE_PARAM_PATH environment "
341 >                 "Error opening the force field parameter file:\n"
342 >                 "\t%s\n"
343 >                 "\tHave you tried setting the FORCE_PARAM_PATH environment "
344                   "variable?\n",
345                   fileName );
346 +        painCave.severity = OOPSE_ERROR;
347          painCave.isFatal = 1;
348          simError();
349        }
# Line 644 | Line 646 | void WATER::initializeAtoms( int nAtoms, Atom** the_at
646  
647    // initialize the atoms
648    DirectionalAtom* dAtom;
649 +  double ji[3];
650    double inertialMat[3][3];
651  
652    for( i=0; i<nAtoms; i++ ){
# Line 655 | Line 658 | void WATER::initializeAtoms( int nAtoms, Atom** the_at
658        painCave.isFatal = 1;
659        simError();
660      }
658    if( currentAtomType->isLJ ) the_atoms[i]->setLJ();
659    if( currentAtomType->isCharge ) the_atoms[i]->setCharged();
661      the_atoms[i]->setMass( currentAtomType->mass );
662      the_atoms[i]->setIdent( currentAtomType->ident );
663  
664      if( bigSigma < currentAtomType->sigma ) bigSigma = currentAtomType->sigma;
665  
666 +    the_atoms[i]->setHasCharge(currentAtomType->isCharge);
667 +
668      if( currentAtomType->isDirectional ){
669        currentDirectionalType =
670          headDirectionalType->find( the_atoms[i]->getType() );
# Line 685 | Line 688 | void WATER::initializeAtoms( int nAtoms, Atom** the_at
688  
689        dAtom = (DirectionalAtom *) the_atoms[i];
690        dAtom->setHasDipole( currentDirectionalType->isDipole );
688      dAtom->setMu( currentDirectionalType->dipole );
689      dAtom->setMu( currentDirectionalType->dipole );
691  
692 <      // if it's sticky then it's an SSD type
693 <      dAtom->setSSD( currentDirectionalType->isSticky );
694 <      dAtom->setJx( 0.0 );
695 <      dAtom->setJy( 0.0 );
695 <      dAtom->setJz( 0.0 );
692 >      ji[0] = 0.0;
693 >      ji[1] = 0.0;
694 >      ji[2] = 0.0;
695 >      dAtom->setJ( ji );
696        dAtom->setI( inertialMat );
697  
698        entry_plug->n_dipoles++;
699    }
700    else{
701      sprintf( painCave.errMsg,
702               "WATER error: Atom \"%s\" is directional, yet no standard"
703               " orientation was specifed in the BASS file.\n",
704               currentAtomType->name );
705      painCave.isFatal = 1;
706      simError();
699      }
700    }
701   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines