34 |
|
} |
35 |
|
|
36 |
|
void EAMAtomTypesSectionParser::parseLine(ForceField& ff,const std::string& line, int lineNo){ |
37 |
– |
AtomType* atomType; |
38 |
– |
std::string atomTypeName; |
39 |
– |
double mass; |
40 |
– |
StringTokenizer tokenizer(line); |
41 |
– |
|
42 |
– |
if (tokenizer.countTokens() >= 2) { |
43 |
– |
atomTypeName = tokenizer.nextToken(); |
44 |
– |
std::string potentialParamFile = tokenizer.nextToken(); |
37 |
|
|
38 |
< |
AtomType* atomType = ff.getAtomType(atomTypeName); |
47 |
< |
if (atomType != NULL) { |
48 |
< |
atomType->setEAM(); |
49 |
< |
parseEAMParamFile(ff, atomType, potentialParamFile, atomType->getIdent()); |
50 |
< |
} else { |
38 |
> |
StringTokenizer tokenizer(line); |
39 |
|
|
40 |
< |
} |
41 |
< |
|
42 |
< |
} else { |
43 |
< |
|
44 |
< |
} |
40 |
> |
if (tokenizer.countTokens() >= 2) { |
41 |
> |
std::string atomTypeName = tokenizer.nextToken(); |
42 |
> |
std::string potentialParamFile = tokenizer.nextToken(); |
43 |
> |
|
44 |
> |
AtomType* atomType = ff.getAtomType(atomTypeName); |
45 |
> |
if (atomType != NULL) { |
46 |
> |
atomType->setEAM(); |
47 |
> |
parseEAMParamFile(ff, atomType, potentialParamFile, atomType->getIdent()); |
48 |
> |
} else { |
49 |
> |
|
50 |
> |
} |
51 |
> |
|
52 |
> |
} else { |
53 |
> |
|
54 |
> |
} |
55 |
|
|
56 |
|
|
57 |
|
} |