ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-4/src/UseTheForce/DUFF.cpp
(Generate patch)

Comparing branches/new_design/OOPSE-4/src/UseTheForce/DUFF.cpp (file contents):
Revision 1759 by tim, Fri Nov 19 18:02:33 2004 UTC vs.
Revision 1760 by tim, Fri Nov 19 20:23:26 2004 UTC

# Line 76 | Line 76 | void DUFF::parse(const std::string& filename) {
76      std::string line;
77      char buffer[bufferSize];
78      int lineNo = 0;
79 <    int atomIdent = 1;  //atom's indent begins from 1 (since only fortran's array begins from 1)
79 >    int atomIdent = getNAtomType() + 1;  //atom's indent begins from 1 (since only fortran's array begins from 1)
80      ParseState currentSection = DUFF::UnknownSection;
81      
82      while(ffStream.getline(buffer, bufferSize)){
# Line 198 | Line 198 | void DUFF::parseAtomType(const std::string& line, int
198          atomType->setName(atomTypeName);
199          atomType->setMass(mass);
200          
201 <        //by default, all of the properties in AtomTypeProperties is set to 0
202 <        //In  Lennard-Jones Force Field, we only need to set Lennard-Jones to true
203 <        atomType->setLennardJones();
201 >        if (isLJ) {
202 >            atomType->setLennardJones();
203 >        }
204  
205 +        if (isCharge) {
206 +            atomType->setCharge();
207 +        }
208 +        
209          atomType->setIdent(ident);
210          
211          atomType->complete();
# Line 261 | Line 265 | void DUFF::parseDirectionalAtomType(const std::string&
265  
266          }
267  
268 <        dAtomType->setDipole(isDipole);
269 <        dAtomType->setSticky(isSticky);
268 >        if (isDipole) {
269 >            dAtomType->setDipole();
270 >        }
271  
272 +        if (isSticky) {
273 +            dAtomType->setSticky();
274 +        }
275 +        
276          Mat3x3d inertialMat;
277          inertialMat(0, 0) = Ixx;
278          inertialMat(1, 1) = Ixx;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines