solventDescriptor.h

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // $Id: solventDescriptor.h,v 1.19 2005/12/23 17:02:00 amoll Exp $
00005 //
00006 
00007 #ifndef BALL_SOLVATION_SOLVENTDESCRIPTOR_H
00008 #define BALL_SOLVATION_SOLVENTDESCRIPTOR_H
00009 
00010 #ifndef BALL_COMMON_H
00011 # include <BALL/common.h>
00012 #endif
00013 
00014 #ifndef BALL_KERNEL_ATOM_H
00015 # include <BALL/KERNEL/atom.h>
00016 #endif
00017 
00018 namespace BALL
00019 {
00024 
00028   class BALL_EXPORT SolventAtomDescriptor
00029   {
00030     public:
00033     Atom::Type type;
00034 
00037     String element_symbol;
00038 
00041     float radius;
00042 
00045     int number_of_atoms;
00046 
00047     SolventAtomDescriptor()
00048     {
00049       type = Atom::UNKNOWN_TYPE;
00050       element_symbol = "?";
00051       radius = 0.0;
00052       number_of_atoms = 0;
00053     };
00054   };
00055 
00056 
00062   class BALL_EXPORT SolventDescriptor
00063   {
00064 
00065     public:
00066 
00067     BALL_CREATE(SolventDescriptor)
00068 
00069     
00072 
00075     SolventDescriptor();
00076 
00079     SolventDescriptor(const SolventDescriptor& solvent);
00080 
00083     SolventDescriptor(const String& name, float number_density,
00084       const std::vector<SolventAtomDescriptor>& atom_list);
00085 
00088     virtual ~SolventDescriptor();
00089 
00091 
00094 
00097     const SolventDescriptor& operator = (const SolventDescriptor& descriptor);
00098 
00101     void clear();
00102 
00104 
00107 
00110     void setName(const String& name);
00111 
00114     const String& getName() const;
00115 
00118     void setNumberDensity(float number_density);
00119     
00122     float getNumberDensity() const;
00123 
00126     void setSolventAtomDescriptorList(const
00127       std::vector<SolventAtomDescriptor>& solvent_atoms);
00128 
00131     const std::vector<SolventAtomDescriptor>& getSolventAtomDescriptorList() const;
00132     
00135     std::vector<SolventAtomDescriptor>& getSolventAtomDescriptorList();
00136 
00139     Size getNumberOfAtomTypes() const;
00140 
00143     const SolventAtomDescriptor& getAtomDescriptor(Position index) const 
00144       throw(Exception::IndexOverflow);
00145     
00148     SolventAtomDescriptor& getAtomDescriptor(Position index) 
00149       throw(Exception::IndexOverflow);
00150 
00152 
00155 
00158     bool isValid() const;
00159 
00162     bool operator == (const SolventDescriptor& descriptor) const;
00163 
00165 
00166     protected:
00167 
00168     /*_ The name of this solvent 
00169     */
00170     String name_;
00171 
00172     /*_ The number density of this solvent, i. e. [missing] 
00173     */
00174     float number_density_;
00175 
00176     /*_ This vector contains all atom types occuring in this solute 
00177     */
00178     std::vector<SolventAtomDescriptor> solvent_atoms_;
00179 
00180     /*_ The valid flag 
00181     */
00182     bool valid_;
00183 
00184   };
00186    
00187 }
00188 
00189 #endif // BALL_SOLVATION_SOLVENTDESCRIPTOR_H