--- branches/new_design/OOPSE-4/src/UseTheForce/DUFF.cpp 2004/11/19 18:02:33 1759 +++ branches/new_design/OOPSE-4/src/UseTheForce/DUFF.cpp 2004/11/19 20:23:26 1760 @@ -76,7 +76,7 @@ void DUFF::parse(const std::string& filename) { std::string line; char buffer[bufferSize]; int lineNo = 0; - int atomIdent = 1; //atom's indent begins from 1 (since only fortran's array begins from 1) + int atomIdent = getNAtomType() + 1; //atom's indent begins from 1 (since only fortran's array begins from 1) ParseState currentSection = DUFF::UnknownSection; while(ffStream.getline(buffer, bufferSize)){ @@ -198,10 +198,14 @@ void DUFF::parseAtomType(const std::string& line, int atomType->setName(atomTypeName); atomType->setMass(mass); - //by default, all of the properties in AtomTypeProperties is set to 0 - //In Lennard-Jones Force Field, we only need to set Lennard-Jones to true - atomType->setLennardJones(); + if (isLJ) { + atomType->setLennardJones(); + } + if (isCharge) { + atomType->setCharge(); + } + atomType->setIdent(ident); atomType->complete(); @@ -261,9 +265,14 @@ void DUFF::parseDirectionalAtomType(const std::string& } - dAtomType->setDipole(isDipole); - dAtomType->setSticky(isSticky); + if (isDipole) { + dAtomType->setDipole(); + } + if (isSticky) { + dAtomType->setSticky(); + } + Mat3x3d inertialMat; inertialMat(0, 0) = Ixx; inertialMat(1, 1) = Ixx;