quadraticBondStretch.h

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // $Id: quadraticBondStretch.h,v 1.18 2005/12/23 17:01:54 amoll Exp $
00005 //
00006  
00007 #ifndef BALL_MOLMEC_PARAMETER_QUADRATICBONDSTRETCH_H
00008 #define BALL_MOLMEC_PARAMETER_QUADRATICBONDSTRETCH_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 {
00027   class BALL_EXPORT QuadraticBondStretch 
00028     : public ParameterSection
00029   {
00030     public:
00031 
00032     enum 
00033     {
00034       UNKNOWN
00035     };
00036 
00037     struct BALL_EXPORT Values 
00038     {
00039       float r0;
00040       float k;
00041     };
00042 
00043     struct BALL_EXPORT Data
00044     {
00045       Atom::StaticAtomAttributes* atom1;
00046       Atom::StaticAtomAttributes* atom2;
00047       Values  values;
00048     };
00049 
00050 
00053     QuadraticBondStretch();
00054 
00057     virtual ~QuadraticBondStretch() ;
00058 
00061     virtual void clear() ;
00062 
00068     virtual bool extractSection(ForceFieldParameters& parameters, const String& section_name);
00069 
00071     virtual bool extractSection(Parameters& parameters, const String& section_name);
00072 
00075     bool hasParameters(Atom::Type I, Atom::Type J) const;
00076     
00079     QuadraticBondStretch::Values getParameters
00080       (Atom::Type I, Atom::Type J) const;
00081     
00086     bool assignParameters
00087       (QuadraticBondStretch::Values& parameters, 
00088        Atom::Type I, Atom::Type J) const;   
00089 
00090     protected:
00091 
00092     Size                  number_of_atom_types_;
00093 
00094     float*                k_;
00095     
00096     float*                r0_;
00097 
00098     bool*                 is_defined_;
00099       
00100     String*               names_;
00101   };
00102 } // namespace BALL
00103 
00104 #endif // BALL_MOLMEC_PARAMETER_QUADRATICBONDSTRETCH_H