60 |
|
nTokens -= 2; |
61 |
|
|
62 |
|
AtomType* atomType = ff.getAtomType(atomTypeName); |
63 |
< |
|
63 |
> |
DirectionalAtomType* dAtomType; |
64 |
|
if (atomType != NULL) { |
65 |
< |
|
66 |
< |
|
67 |
< |
//parse charge |
68 |
< |
if (biggestRank >= 1) { |
69 |
< |
parseCharge(tokenizer, atomType); |
70 |
< |
} |
71 |
< |
|
72 |
< |
DirectionalAtomType* dAtomType = dynamic_cast<DirectionalAtomType*>(atomType); |
73 |
< |
if (dAtomType != NULL) { |
74 |
< |
|
75 |
< |
} else { |
76 |
< |
std::cerr << "ElectrostaticAtomTypesSectionParser Warning:" << std::endl; |
77 |
< |
} |
78 |
< |
|
65 |
> |
|
66 |
|
switch (biggestRank) { |
67 |
< |
case 1 : |
67 |
> |
case 0 : |
68 |
|
parseCharge(tokenizer, atomType); |
69 |
|
break; |
70 |
|
|
71 |
< |
case 2 : |
71 |
> |
case 1 : |
72 |
> |
|
73 |
> |
dAtomType = dynamic_cast<DirectionalAtomType*>(atomType); |
74 |
> |
if (dAtomType == NULL) { |
75 |
> |
std::cerr << "ElectrostaticAtomTypesSectionParser Warning:" << std::endl; |
76 |
> |
} |
77 |
> |
|
78 |
|
parseCharge(tokenizer, dAtomType); |
79 |
|
parseDipole(tokenizer, dAtomType); |
80 |
|
parseElectroBodyFrame(tokenizer, dAtomType); |
81 |
|
break; |
82 |
|
|
83 |
< |
case 3: |
83 |
> |
case 2: |
84 |
> |
|
85 |
> |
dAtomType = dynamic_cast<DirectionalAtomType*>(atomType); |
86 |
> |
if (dAtomType == NULL) { |
87 |
> |
std::cerr << "ElectrostaticAtomTypesSectionParser Warning:" << std::endl; |
88 |
> |
} |
89 |
> |
|
90 |
|
parseCharge(tokenizer, dAtomType); |
91 |
|
parseDipole(tokenizer, dAtomType); |
92 |
|
parseQuadruple(tokenizer, dAtomType); |