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 202 by gezelter, Thu Nov 4 16:20:28 2004 UTC vs.
Revision 240 by tim, Fri Dec 10 18:41:05 2004 UTC

# Line 578 | Line 578 | void WATER::readParams( void ){
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),
# Line 658 | Line 660 | void WATER::initializeAtoms( int nAtoms, Atom** the_at
660        painCave.isFatal = 1;
661        simError();
662      }
663 +
664 +    if( currentAtomType->isDirectional ){
665 +      currentDirectionalType =
666 +        headDirectionalType->find( the_atoms[i]->getType() );
667 +      if( currentDirectionalType == NULL ){
668 +        sprintf( painCave.errMsg,
669 +                 "DirectionalType error, %s not found in force file.\n",
670 +                 the_atoms[i]->getType() );
671 +        painCave.isFatal = 1;
672 +        simError();
673 +      }
674 +
675      the_atoms[i]->setMass( currentAtomType->mass );
676      the_atoms[i]->setIdent( currentAtomType->ident );
677  
# Line 672 | Line 686 | void WATER::initializeAtoms( int nAtoms, Atom** the_at
686  
687      the_atoms[i]->setHasCharge(currentAtomType->isCharge);
688  
689 <    if( currentAtomType->isDirectional ){
676 <      currentDirectionalType =
677 <        headDirectionalType->find( the_atoms[i]->getType() );
678 <      if( currentDirectionalType == NULL ){
679 <        sprintf( painCave.errMsg,
680 <                 "DirectionalType error, %s not found in force file.\n",
681 <                 the_atoms[i]->getType() );
682 <        painCave.isFatal = 1;
683 <        simError();
684 <      }
689 >
690  
691        // zero out the moments of inertia matrix
692        for( j=0; j<3; j++ )

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines