00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 00005 // Molecular Mechanics Parameter: class describing the atom type section of a parameter file 00006 00007 #ifndef BALL_MOLMEC_PARAMETER_LENNARDJONES_H 00008 #define BALL_MOLMEC_PARAMETER_LENNARDJONES_H 00009 00010 #ifndef BALL_FORMAT_PARAMETERSECTION_H 00011 # include <BALL/FORMAT/parameterSection.h> 00012 #endif 00013 00014 #ifndef BALL_MOLMEC_PARAMETER_ATOMTYPES_H 00015 # include <BALL/MOLMEC/PARAMETER/atomTypes.h> 00016 #endif 00017 00018 namespace BALL 00019 { 00042 class BALL_EXPORT LennardJones 00043 : public ParameterSection 00044 { 00045 public: 00046 00050 00051 enum FormatType 00052 { 00053 A_B_FORMAT, 00054 EPSILON_R_FORMAT, 00055 SLATER_KIRKWOOD_FORMAT 00056 }; 00057 00059 00062 00065 struct BALL_EXPORT Values 00066 { 00067 float A; 00068 float B; 00069 }; 00070 00071 struct BALL_EXPORT Data 00072 { 00073 Atom* atom1; 00074 Atom* atom2; 00075 Values values; 00076 }; 00077 00079 00080 00084 00087 LennardJones() ; 00088 00091 LennardJones(const LennardJones& lj) ; 00092 00095 virtual ~LennardJones() ; 00096 00099 virtual void clear() ; 00100 00102 00109 virtual bool extractSection(ForceFieldParameters& parameters, 00110 const String& section_name) ; 00111 00113 virtual bool extractSection(Parameters& parameters, 00114 const String& section_name) ; 00115 00118 bool hasParameters(Atom::Type I, Atom::Type J) const ; 00119 00122 Values getParameters(Atom::Type I, Atom::Type J) const ; 00123 00128 bool assignParameters(Values& parameters, Atom::Type I, Atom::Type J) 00129 const ; 00130 00134 00137 const LennardJones& operator = (const LennardJones& lj) ; 00138 00140 00143 00146 bool operator == (const LennardJones& lj) const ; 00147 00149 00150 protected: 00151 00152 Size number_of_atom_types_; 00153 00154 std::vector<float> A_; 00155 00156 std::vector<float> B_; 00157 00158 std::vector<float> N_; 00159 00160 std::vector<float> Aij_; 00161 00162 std::vector<float> Bij_; 00163 00164 std::vector<bool> is_defined_; 00165 00166 FormatType format_; 00167 00168 std::vector<String> names_; 00169 }; 00170 } // namespace BALL 00171 00172 #endif // BALL_MOLMEC_PARAMETER_LENNARDJONES_H