37 |
|
#define MK_STR(s) # s |
38 |
|
#define STR_DEFINE(t, s) t = MK_STR(s) |
39 |
|
|
40 |
+ |
#include <string> |
41 |
|
#include <utilities> |
42 |
|
|
42 |
– |
#include "utils/Tuple.hpp" |
43 |
– |
#include "types/ShapeAtomType.hpp" |
43 |
|
#include "io/basic_ifstrstream.hpp" |
44 |
|
#include "utils/TypeContainer.hpp" |
45 |
+ |
#include "types/AtomType.hpp" |
46 |
+ |
#include "types/BondType.hpp" |
47 |
+ |
#include "types/BendType.hpp" |
48 |
+ |
#include "types/TorsionType.hpp" |
49 |
|
|
50 |
|
namespace oopse { |
51 |
|
|
65 |
|
hasVariant_ = true; |
66 |
|
variant_ = variant; |
67 |
|
} |
68 |
< |
virtual void readParams() = 0; |
68 |
> |
|
69 |
> |
virtual void parse(const std::string& filename) = 0; |
70 |
|
|
71 |
|
AtomType* getAtomType(const std::string &at); |
72 |
|
BondType* getBondType(const std::string &at1, const std::string &at2); |
75 |
|
TorsionType* getTorsionType(const std::string &at1, const std::string &at2, |
76 |
|
const std::string &at3, const std::string &at4); |
77 |
|
|
78 |
+ |
//avoid make virtual function public |
79 |
+ |
//Herb Sutter and Andrei Alexandrescu, C++ coding Standards, Addision-Wesley |
80 |
|
virtual double getRcutFromAtomType(AtomType* at); |
81 |
|
|
82 |
|
std::string getWildCard() { |
89 |
|
|
90 |
|
protected: |
91 |
|
|
92 |
< |
void addAtomType(const std::string &at, AtomType* atomType); |
93 |
< |
void addBondType(const std::string &at1, const std::string &at2, BondType* bondType); |
94 |
< |
void addBendType(const std::string &at1, const std::string &at2, |
92 |
> |
bool addAtomType(const std::string &at, AtomType* atomType); |
93 |
> |
bool addBondType(const std::string &at1, const std::string &at2, BondType* bondType); |
94 |
> |
bool addBendType(const std::string &at1, const std::string &at2, |
95 |
|
const std::string &at3, BendType* bendType); |
96 |
< |
void addTorsionType(const std::string &at1, const std::string &at2, |
96 |
> |
bool addTorsionType(const std::string &at1, const std::string &at2, |
97 |
|
const std::string &at3, const std::string &at4, TorsionType* torsionType); |
98 |
|
|
99 |
+ |
ifstrstream* openForceFieldFile(const std::string& filename); |
100 |
|
private: |
101 |
|
std::string ffPath_; |
95 |
– |
ifstrstream forceFile_; |
102 |
|
bool hasVariant_; |
103 |
|
std::string variant_; |
104 |
|
|
115 |
|
TorsionTypeContainer torsionTypeCont_; |
116 |
|
}; |
117 |
|
|
112 |
– |
typedef GenericFactory<ForceField> ForceFieldFactory; |
118 |
|
|
119 |
|
}//end namespace oopse |
120 |
|
#endif |