25 |
|
|
26 |
|
#include "io/ElectrostaticAtomTypesSectionParser.hpp" |
27 |
|
|
28 |
+ |
#include "types/AtomType.hpp" |
29 |
+ |
#include "types/DirectionalAtomType.hpp" |
30 |
+ |
|
31 |
|
namespace oopse { |
32 |
|
|
33 |
|
ElectrostaticAtomTypesSectionParser::ElectrostaticAtomTypesSectionParser() { |
41 |
|
//in AtomTypeSection, a line at least contains 2 tokens |
42 |
|
//atomTypeName and biggest rank |
43 |
|
//for the time being, we only support up to quadrupole |
44 |
< |
//name 0 charge |
45 |
< |
//name 1 charge dipole_moment |
46 |
< |
//name 2 chargre dipole_moment Qxx Qyy Qzz |
44 |
> |
// "name" must match the name in the AtomTypes section |
45 |
> |
// charge is given in units of electrons (1.61 x 10^-19 C) |
46 |
> |
// Directionality for dipoles and quadrupoles must be given because the body-fixed |
47 |
> |
// reference frame for directional atoms is determined by the *mass* distribution and |
48 |
> |
// not by the charge distribution. |
49 |
> |
// Dipoles are given in units of Debye |
50 |
> |
// Quadrupoles are given in units of |
51 |
> |
// name 0 charge |
52 |
> |
// name 1 charge |u| [theta phi psi] |
53 |
> |
// name 2 charge |u| Qxx Qyy Qzz [theta phi psi] |
54 |
|
|
55 |
|
if (nTokens < 2) { |
56 |
|
std::cerr << "ElectrostaticAtomTypesSectionParser Error: Not enought Tokens at line " << lineNo << std::endl; |
63 |
|
if (nTokens < requiredTokens(biggestRank)) { |
64 |
|
|
65 |
|
} |
56 |
– |
|
66 |
|
|
67 |
|
AtomType* atomType = ff ->getAtomType(atomTypeName); |
68 |
|
|