63 |
|
// Dipoles are given in units of Debye |
64 |
|
// Quadrupoles are given in units of |
65 |
|
// examples: |
66 |
< |
// name d theta phi psi dipole_moment |
67 |
< |
// name s theta phi psi dipole_moment splitdipole_distance |
68 |
< |
// name q theta phi psi Qxx Qyy Qzz |
69 |
< |
// name dq theta phi psi dipole_moment Qxx Qyy Qzz |
70 |
< |
// name sq theta phi psi dipole_moment splitdipole_distance Qxx Qyy Qzz |
66 |
> |
// name d phi theta psi dipole_moment |
67 |
> |
// name s phi theta psi dipole_moment splitdipole_distance |
68 |
> |
// name q phi theta psi Qxx Qyy Qzz |
69 |
> |
// name dq phi theta psi dipole_moment Qxx Qyy Qzz |
70 |
> |
// name sq phi theta psi dipole_moment splitdipole_distance Qxx Qyy Qzz |
71 |
|
|
72 |
|
if (nTokens < 5) { |
73 |
|
sprintf(painCave.errMsg, "MultipoleAtomTypesSectionParser Error: Not enough tokens at line %d\n", |
85 |
|
|
86 |
|
AtomType* atomType = ff.getAtomType(atomTypeName); |
87 |
|
if (atomType == NULL) { |
88 |
< |
sprintf(painCave.errMsg, "MultipoleAtomTypesSectionParser Error: Can not find matched AtomType at line %d\n", |
89 |
< |
lineNo); |
88 |
> |
sprintf(painCave.errMsg, "MultipoleAtomTypesSectionParser Error: Can not find matched AtomType[%s] at line %d\n", |
89 |
> |
atomTypeName.c_str(), lineNo); |
90 |
|
painCave.isFatal = 1; |
91 |
|
simError(); |
92 |
|
} |
93 |
|
|
94 |
|
DirectionalAtomType* dAtomType = dynamic_cast<DirectionalAtomType*>(atomType); |
95 |
|
if (dAtomType == NULL) { |
96 |
< |
sprintf(painCave.errMsg, "MultipoleAtomTypesSectionParser Error: Can not Cast Atom to DirectionalAtom at line \n"); |
96 |
> |
sprintf(painCave.errMsg, "MultipoleAtomTypesSectionParser Error: Can not Cast Atom to DirectionalAtom at line %d\n", lineNo); |
97 |
|
painCave.isFatal = 1; |
98 |
|
simError(); |
99 |
|
} |
158 |
|
void MultipoleAtomTypesSectionParser::parseQuadruple(StringTokenizer& tokenizer, |
159 |
|
DirectionalAtomType* dAtomType, int lineNo) { |
160 |
|
int nTokens = tokenizer.countTokens(); |
161 |
< |
if (nTokens < 3) { |
161 |
> |
if (nTokens >= 3) { |
162 |
|
Vector3d Q; |
163 |
|
Q[0] = tokenizer.nextTokenAsDouble(); |
164 |
|
Q[1] = tokenizer.nextTokenAsDouble(); |