ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/src/io/LennardJonesAtomTypesSectionParser.cpp
(Generate patch)

Comparing trunk/OOPSE-2.0/src/io/LennardJonesAtomTypesSectionParser.cpp (file contents):
Revision 2008 by tim, Sun Feb 13 19:10:25 2005 UTC vs.
Revision 2062 by tim, Fri Feb 25 21:22:00 2005 UTC

# Line 53 | Line 53 | void LennardJonesAtomTypesSectionParser::parseLine(For
53      StringTokenizer tokenizer(line);
54      int nTokens = tokenizer.countTokens();    
55  
56 <    //in AtomTypeSection, a line at least contains 2 tokens
57 <    //atomTypeName and mass
56 >    //in LennardJonesAtomTypesSectionParser, a line at least contains 3 tokens
57 >    //atomTypeName, epsilon and sigma
58      if (nTokens < 3)  {
59          sprintf(painCave.errMsg, "LennardJonesAtomTypesSectionParser Error: Not enough tokens at line %d\n",
60                  lineNo);
# Line 69 | Line 69 | void LennardJonesAtomTypesSectionParser::parseLine(For
69              LJParam ljParam;                        
70              ljParam.epsilon = tokenizer.nextTokenAsDouble();
71              ljParam.sigma = tokenizer.nextTokenAsDouble();
72 +            ljParam.soft_pot = 0;
73 +
74 +            if (tokenizer.hasMoreTokens()) {
75 +                std::string pot_type = tokenizer.nextToken();
76 +                if (pot_type == "soft") {
77 +                    ljParam.soft_pot = 1;
78 +                }
79 +            }
80 +            
81              atomType->addProperty(new LJParamGenericData("LennardJones", ljParam));
82              atomType->setLennardJones();
83          }else {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines