| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
#ifndef BALL_MOLMEC_PARAMETER_QUADRATICIMPROPERTORSION_H |
| 9 |
#define BALL_MOLMEC_PARAMETER_QUADRATICIMPROPERTORSION_H |
| 10 |
|
| 11 |
#ifndef BALL_FORMAT_PARAMETERSECTION_H |
| 12 |
# include <BALL/FORMAT/parameterSection.h> |
| 13 |
#endif |
| 14 |
|
| 15 |
#ifndef BALL_MOLMEC_PARAMETER_ATOMTYPES_H |
| 16 |
# include <BALL/MOLMEC/PARAMETER/atomTypes.h> |
| 17 |
#endif |
| 18 |
|
| 19 |
namespace BALL |
| 20 |
{ |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
class BALL_EXPORT QuadraticImproperTorsion |
| 28 |
: public ParameterSection |
| 29 |
{ |
| 30 |
public: |
| 31 |
|
| 32 |
enum |
| 33 |
{ |
| 34 |
UNKNOWN |
| 35 |
}; |
| 36 |
|
| 37 |
struct BALL_EXPORT Values |
| 38 |
{ |
| 39 |
float phase; |
| 40 |
float k; |
| 41 |
|
| 42 |
bool operator == (const Values& values) const |
| 43 |
{ |
| 44 |
return ((phase == values.phase) && (k == values.k)); |
| 45 |
} |
| 46 |
|
| 47 |
bool operator != (const Values& values) const |
| 48 |
{ |
| 49 |
return !(operator == (values)); |
| 50 |
} |
| 51 |
|
| 52 |
}; |
| 53 |
|
| 54 |
struct Data |
| 55 |
{ |
| 56 |
Atom* atom1; |
| 57 |
Atom* atom2; |
| 58 |
Atom* atom3; |
| 59 |
Atom* atom4; |
| 60 |
|
| 61 |
Values values; |
| 62 |
}; |
| 63 |
|
| 64 |
BALL_CREATE(QuadraticImproperTorsion) |
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
QuadraticImproperTorsion() ; |
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
QuadraticImproperTorsion(const QuadraticImproperTorsion& torsion) |
| 77 |
; |
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
virtual ~QuadraticImproperTorsion() ; |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
virtual void clear() ; |
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
virtual bool extractSection(ForceFieldParameters& parameters, |
| 99 |
const String& section_name) ; |
| 100 |
|
| 101 |
|
| 102 |
virtual bool extractSection(Parameters& parameters, |
| 103 |
const String& section_name) ; |
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
bool hasParameters(Atom::Type I, Atom::Type J, Atom::Type K, Atom::Type L) |
| 110 |
const ; |
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
QuadraticImproperTorsion::Values getParameters(Atom::Type I, Atom::Type J, |
| 115 |
Atom::Type K, Atom::Type L) const ; |
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
bool assignParameters(QuadraticImproperTorsion::Values& parameters, |
| 122 |
Atom::Type I, Atom::Type J, Atom::Type K, Atom::Type L) const |
| 123 |
; |
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
const QuadraticImproperTorsion& operator = |
| 132 |
(const QuadraticImproperTorsion& torsion) ; |
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
bool operator == (const QuadraticImproperTorsion& torsion) const |
| 142 |
; |
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
protected: |
| 147 |
|
| 148 |
Size number_of_atom_types_; |
| 149 |
|
| 150 |
vector<Values> torsions_; |
| 151 |
|
| 152 |
HashMap<Size, Size> torsion_hash_map_; |
| 153 |
}; |
| 154 |
|
| 155 |
} |
| 156 |
|
| 157 |
#endif |