BALL
1.4.1
|
00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 00005 // Molecular Mechanics Parameter: class describing the parameters required to 00006 // describe a harmonic improper torsion (out-of-plane) potential 00007 00008 #ifndef BALL_MOLMEC_PARAMETER_QUADRATICIMPROPERTORSION_H 00009 #define BALL_MOLMEC_PARAMETER_QUADRATICIMPROPERTORSION_H 00010 00011 #ifndef BALL_FORMAT_PARAMETERSECTION_H 00012 # include <BALL/FORMAT/parameterSection.h> 00013 #endif 00014 00015 #ifndef BALL_MOLMEC_PARAMETER_ATOMTYPES_H 00016 # include <BALL/MOLMEC/PARAMETER/atomTypes.h> 00017 #endif 00018 00019 namespace BALL 00020 { 00027 class BALL_EXPORT QuadraticImproperTorsion 00028 : public ParameterSection 00029 { 00030 public: 00031 00032 enum 00033 { 00034 UNKNOWN 00035 }; 00036 00037 struct BALL_EXPORT Values 00038 { 00039 float phase; 00040 float k; 00041 00042 bool operator == (const Values& values) const 00043 { 00044 return ((phase == values.phase) && (k == values.k)); 00045 } 00046 00047 bool operator != (const Values& values) const 00048 { 00049 return !(operator == (values)); 00050 } 00051 00052 }; 00053 00054 struct Data 00055 { 00056 Atom* atom1; 00057 Atom* atom2; 00058 Atom* atom3; 00059 Atom* atom4; 00060 00061 Values values; 00062 }; 00063 00064 BALL_CREATE(QuadraticImproperTorsion) 00065 00066 00069 00072 QuadraticImproperTorsion() ; 00073 00076 QuadraticImproperTorsion(const QuadraticImproperTorsion& torsion) 00077 ; 00078 00081 virtual ~QuadraticImproperTorsion() ; 00082 00085 virtual void clear() ; 00086 00088 00091 00098 virtual bool extractSection(ForceFieldParameters& parameters, 00099 const String& section_name) ; 00100 00102 virtual bool extractSection(Parameters& parameters, 00103 const String& section_name) ; 00104 00106 00109 bool hasParameters(Atom::Type I, Atom::Type J, Atom::Type K, Atom::Type L) 00110 const ; 00111 00114 QuadraticImproperTorsion::Values getParameters(Atom::Type I, Atom::Type J, 00115 Atom::Type K, Atom::Type L) const ; 00116 00121 bool assignParameters(QuadraticImproperTorsion::Values& parameters, 00122 Atom::Type I, Atom::Type J, Atom::Type K, Atom::Type L) const 00123 ; 00124 00128 00131 const QuadraticImproperTorsion& operator = 00132 (const QuadraticImproperTorsion& torsion) ; 00133 00135 00138 00141 bool operator == (const QuadraticImproperTorsion& torsion) const 00142 ; 00143 00145 00146 protected: 00147 00148 Size number_of_atom_types_; 00149 00150 vector<Values> torsions_; 00151 00152 HashMap<Size, Size> torsion_hash_map_; 00153 }; 00155 } // namespace BALL 00156 00157 #endif // BALL_MOLMEC_PARAMETER_QUADRATICIMPROPERTORSION_H