42 |
|
#include "io/DirectionalAtomTypesSectionParser.hpp" |
43 |
|
#include "UseTheForce/ForceField.hpp" |
44 |
|
#include "types/DirectionalAtomType.hpp" |
45 |
< |
|
45 |
> |
#include "utils/simError.h" |
46 |
|
namespace oopse { |
47 |
|
|
48 |
|
DirectionalAtomTypesSectionParser::DirectionalAtomTypesSectionParser() { |
56 |
|
//in AtomTypeSection, a line at least contains 2 tokens |
57 |
|
//atomTypeName and mass |
58 |
|
if (nTokens < 4) { |
59 |
< |
std::cerr << "DirectionalAtomTypesSectionParser:: Not enought Tokens" << std::endl; |
59 |
> |
sprintf(painCave.errMsg, "DirectionalAtomTypesSectionParser Error: Not enough tokens at line %d\n", |
60 |
> |
lineNo); |
61 |
> |
painCave.isFatal = 1; |
62 |
> |
simError(); |
63 |
> |
|
64 |
|
} else { |
65 |
|
|
66 |
|
std::string atomTypeName = tokenizer.nextToken(); |
75 |
|
} else { |
76 |
|
dAtomType = dynamic_cast<DirectionalAtomType*>(atomType); |
77 |
|
if (dAtomType == NULL) { |
78 |
< |
std::cerr << "DirectionalAtomTypesSectionParser:: Can not cast to DirectionalAtomType" << std::endl; |
78 |
> |
sprintf(painCave.errMsg,"DirectionalAtomTypesSectionParser:: Can not cast to DirectionalAtomType"); |
79 |
> |
painCave.isFatal = 1; |
80 |
> |
simError(); |
81 |
|
} |
82 |
|
} |
83 |
|
|