00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef BALL_MOLMEC_PARAMETER_LENNARDJONES_H
00010 #define BALL_MOLMEC_PARAMETER_LENNARDJONES_H
00011
00012 #ifndef BALL_FORMAT_PARAMETERSECTION_H
00013 # include <BALL/FORMAT/parameterSection.h>
00014 #endif
00015
00016 #ifndef BALL_MOLMEC_PARAMETER_ATOMTYPES_H
00017 # include <BALL/MOLMEC/PARAMETER/atomTypes.h>
00018 #endif
00019
00020 namespace BALL
00021 {
00044 class BALL_EXPORT LennardJones
00045 : public ParameterSection
00046 {
00047 public:
00048
00052
00053 enum FormatType
00054 {
00055 A_B_FORMAT,
00056 EPSILON_R_FORMAT,
00057 SLATER_KIRKWOOD_FORMAT
00058 };
00059
00061
00064
00067 struct BALL_EXPORT Values
00068 {
00069 float A;
00070 float B;
00071 };
00072
00073 struct BALL_EXPORT Data
00074 {
00075 Atom::StaticAtomAttributes* atom1;
00076 Atom::StaticAtomAttributes* atom2;
00077 Values values;
00078 };
00079
00081
00082
00086
00089 LennardJones() ;
00090
00093 LennardJones(const LennardJones& lj) ;
00094
00097 virtual ~LennardJones() ;
00098
00101 virtual void clear() ;
00102
00104
00111 virtual bool extractSection(ForceFieldParameters& parameters,
00112 const String& section_name) ;
00113
00115 virtual bool extractSection(Parameters& parameters,
00116 const String& section_name) ;
00117
00120 bool hasParameters(Atom::Type I, Atom::Type J) const ;
00121
00124 Values getParameters(Atom::Type I, Atom::Type J) const ;
00125
00130 bool assignParameters(Values& parameters, Atom::Type I, Atom::Type J)
00131 const ;
00132
00136
00139 const LennardJones& operator = (const LennardJones& lj) ;
00140
00142
00145
00148 bool operator == (const LennardJones& lj) const ;
00149
00151
00152 protected:
00153
00154 Size number_of_atom_types_;
00155
00156 std::vector<float> A_;
00157
00158 std::vector<float> B_;
00159
00160 std::vector<float> N_;
00161
00162 std::vector<float> Aij_;
00163
00164 std::vector<float> Bij_;
00165
00166 std::vector<bool> is_defined_;
00167
00168 FormatType format_;
00169
00170 std::vector<String> names_;
00171 };
00172 }
00173
00174 #endif // BALL_MOLMEC_PARAMETER_LENNARDJONES_H