BALL  1.4.1
rotamerLibrary.h
Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 
00005 #ifndef BALL_STRUCTURE_ROTAMERLIBRARY_H
00006 #define BALL_STRUCTURE_ROTAMERLIBRARY_H
00007 
00008 #ifndef BALL_STRUCTURE_FRAGMENT_DB_H
00009 # include <BALL/STRUCTURE/fragmentDB.h>
00010 #endif
00011 
00012 #ifndef BALL_STRUCTURE_RESIDUEROTAMERSET_H
00013  #include <BALL/STRUCTURE/residueRotamerSet.h>
00014 #endif
00015 
00016 #ifndef BALL_DATATYPE_HASHMAP_H
00017   #include <BALL/DATATYPE/hasMap.h>
00018 #endif
00019 
00020 //#include <map>
00021 
00022 namespace BALL
00023 {
00024   class FragmentDB;
00025   class String;
00026 
00033   class BALL_EXPORT RotamerLibrary
00034   {
00035     public:
00036 
00037     BALL_CREATE(RotamerLibrary)
00038 
00039     
00042 
00044     static const String DEFAULT_LIBRARY;
00045 
00047     static const String DEFAULT_FRAGMENT_DB;
00049 
00057     RotamerLibrary() ;
00058 
00060     RotamerLibrary(const String& filename, const FragmentDB& fragment_db) ;
00061 
00063     RotamerLibrary(const FragmentDB& fragment_db) ;
00064 
00066     RotamerLibrary(const RotamerLibrary& library) ;
00067 
00069     virtual ~RotamerLibrary();
00071 
00075 
00076     RotamerLibrary& operator = (const RotamerLibrary& rhs);
00078       
00079 
00083 
00084     ResidueRotamerSet* getRotamerSet(const String& name);
00085 
00087     ResidueRotamerSet* getRotamerSet(const String& name, float phi, float psi);
00088 
00090     ResidueRotamerSet* getRotamerSet(const Residue& residue);
00091 
00093     Size getNumberOfRotamers() const;
00094 
00096     Size getNumberOfRotamers(const String& name) const;
00097 
00099     Size getNumberOfRotamerSets() const;
00100 
00102     void addRotamer(const String& name, const Rotamer& rotamer, Size number_of_torsions, Index phi, Index psi);
00103 
00105     void addRotamer(const String& name, const Rotamer& rotamer, Size number_of_torsions);
00106 
00108     bool isBackboneDependent() const;
00109 
00111     void setBackboneDependent(bool dependent);
00112 
00114     bool hasRotamers(const String& name) const;
00115 
00117     bool validate();
00118 
00120     void sort();
00121 
00125     void clear();
00127 
00128     protected:
00129 
00133 
00134     HashMap<Index, HashMap<Index, HashMap<String, ResidueRotamerSet> > > bb_dep_sets_;
00135   
00137     HashMap<String, ResidueRotamerSet> bb_indep_sets_;
00138 
00140     Index getNearestBackboneTorsion_(double angle) const;
00141 
00143     Size step_width_;
00144 
00146     FragmentDB fragment_db_;
00147 
00149     bool backbone_dependent_;
00151   };
00152 
00153 } // namespace BALL
00154 
00155 #endif // BALL_STRUCTURE_ROTAMERLIBRARY_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines