--- trunk/OOPSE-3.0/src/io/DirectionalAtomTypesSectionParser.cpp 2005/04/15 22:43:26 2208 +++ trunk/OOPSE-3.0/src/io/DirectionalAtomTypesSectionParser.cpp 2005/04/18 03:50:23 2209 @@ -49,15 +49,18 @@ namespace oopse { setSectionName("DirectionalAtomTypes"); } - void DirectionalAtomTypesSectionParser::parseLine(ForceField& ff,const std::string& line, int lineNo){ + void DirectionalAtomTypesSectionParser::parseLine(ForceField& ff, + const std::string& line, + int lineNo){ StringTokenizer tokenizer(line); int nTokens = tokenizer.countTokens(); //in AtomTypeSection, a line at least contains 2 tokens //atomTypeName and mass if (nTokens < 4) { - sprintf(painCave.errMsg, "DirectionalAtomTypesSectionParser Error: Not enough tokens at line %d\n", - lineNo); + sprintf(painCave.errMsg, + "DirectionalAtomTypesSectionParser Error: Not enough tokens at line %d\n", + lineNo); painCave.isFatal = 1; simError(); @@ -67,20 +70,21 @@ namespace oopse { AtomType* atomType = ff.getAtomType(atomTypeName); DirectionalAtomType* dAtomType; if (atomType == NULL) { - dAtomType = new DirectionalAtomType(); - int ident = ff.getNAtomType() + 1; - dAtomType->setIdent(ident); - dAtomType->setName(atomTypeName); - ff.addAtomType(atomTypeName, dAtomType); + dAtomType = new DirectionalAtomType(); + int ident = ff.getNAtomType() + 1; + dAtomType->setIdent(ident); + dAtomType->setName(atomTypeName); + ff.addAtomType(atomTypeName, dAtomType); } else { - dAtomType = dynamic_cast(atomType); - if (dAtomType == NULL) { - sprintf(painCave.errMsg,"DirectionalAtomTypesSectionParser:: Can not cast to DirectionalAtomType"); - painCave.isFatal = 1; - simError(); - } + dAtomType = dynamic_cast(atomType); + if (dAtomType == NULL) { + sprintf(painCave.errMsg, + "DirectionalAtomTypesSectionParser:: Can not cast to DirectionalAtomType"); + painCave.isFatal = 1; + simError(); + } } - + double Ixx = tokenizer.nextTokenAsDouble(); double Iyy = tokenizer.nextTokenAsDouble(); double Izz = tokenizer.nextTokenAsDouble();