00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 00005 #ifndef BALL_MOLMEC_PARAMETER_QUADRATICBONDSTRETCH_H 00006 #define BALL_MOLMEC_PARAMETER_QUADRATICBONDSTRETCH_H 00007 00008 #ifndef BALL_FORMAT_PARAMETERSECTION_H 00009 # include <BALL/FORMAT/parameterSection.h> 00010 #endif 00011 00012 #ifndef BALL_MOLMEC_PARAMETER_ATOMTYPES_H 00013 # include <BALL/MOLMEC/PARAMETER/atomTypes.h> 00014 #endif 00015 00016 namespace BALL 00017 { 00025 class BALL_EXPORT QuadraticBondStretch 00026 : public ParameterSection 00027 { 00028 public: 00029 00030 enum 00031 { 00032 UNKNOWN 00033 }; 00034 00035 struct BALL_EXPORT Values 00036 { 00037 float r0; 00038 float k; 00039 }; 00040 00041 struct BALL_EXPORT Data 00042 { 00043 Atom* atom1; 00044 Atom* atom2; 00045 Values values; 00046 }; 00047 00048 00051 QuadraticBondStretch(); 00052 00055 virtual ~QuadraticBondStretch() ; 00056 00059 virtual void clear() ; 00060 00066 virtual bool extractSection(ForceFieldParameters& parameters, const String& section_name); 00067 00069 virtual bool extractSection(Parameters& parameters, const String& section_name); 00070 00073 bool hasParameters(Atom::Type I, Atom::Type J) const; 00074 00077 QuadraticBondStretch::Values getParameters 00078 (Atom::Type I, Atom::Type J) const; 00079 00084 bool assignParameters 00085 (QuadraticBondStretch::Values& parameters, 00086 Atom::Type I, Atom::Type J) const; 00087 00088 protected: 00089 00090 Size number_of_atom_types_; 00091 00092 float* k_; 00093 00094 float* r0_; 00095 00096 bool* is_defined_; 00097 00098 String* names_; 00099 }; 00100 } // namespace BALL 00101 00102 #endif // BALL_MOLMEC_PARAMETER_QUADRATICBONDSTRETCH_H