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

Comparing branches/new_design/OOPSE-3.0/src/UseTheForce/DUFF.cpp (file contents):
Revision 1758 by tim, Fri Nov 19 17:56:32 2004 UTC vs.
Revision 1759 by tim, Fri Nov 19 18:02:33 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)
80      ParseState currentSection = DUFF::UnknownSection;
81      
82      while(ffStream.getline(buffer, bufferSize)){
# Line 89 | Line 90 | void DUFF::parse(const std::string& filename) {
90  
91              switch(currentSection) {
92                  case DUFF::AtomTypeSection :
93 <                    parseAtomType(line, lineNo);
93 >                    parseAtomType(line, lineNo, atomIdent);
94                      break;
95  
96 +                case DUFF::DirectionalAtomTypeSection :
97 +                    parseDirectionalAtomType(line, lineNo);
98 +                    break;
99 +                    
100                  case DUFF::BondTypeSection :
101                      parseBondType(line, lineNo);
102                      break;
# Line 149 | Line 154 | void DUFF::parseAtomType(const std::string& line, int
154      //in AtomTypeSection, a line at least contains 5 tokens
155      //atomTypeName, is Directional, isLJ, isCharge and mass
156      if (nTokens < 5)  {
157 <        sprintf( painCave.errMsg,
153 <               "Not enough tokens when parsing DUFF Force Field : %s\n"
154 <               "in line %d : %s\n",
155 <               filename.c_str(), lineNo, line);
156 <        painCave.severity = OOPSE_ERROR;
157 <        painCave.isFatal = 1;
158 <        simError();                
159 <
160 <        
157 >                      
158      } else {
159  
160          std::string atomTypeName = tokenizer.nextToken();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines