BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rotamerLibrary.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_STRUCTURE_ROTAMERLIBRARY_H
6 #define BALL_STRUCTURE_ROTAMERLIBRARY_H
7 
8 #ifndef BALL_STRUCTURE_FRAGMENT_DB_H
10 #endif
11 
12 #ifndef BALL_STRUCTURE_RESIDUEROTAMERSET_H
14 #endif
15 
16 #ifndef BALL_DATATYPE_HASHMAP_H
17  #include <BALL/DATATYPE/hasMap.h>
18 #endif
19 
20 //#include <map>
21 
22 namespace BALL
23 {
24  class FragmentDB;
25  class String;
26 
34  {
35  public:
36 
38 
39 
42 
44  static const String DEFAULT_LIBRARY;
45 
47  static const String DEFAULT_FRAGMENT_DB;
49 
57  RotamerLibrary() ;
58 
60  RotamerLibrary(const String& filename, const FragmentDB& fragment_db) ;
61 
63  RotamerLibrary(const FragmentDB& fragment_db) ;
64 
66  RotamerLibrary(const RotamerLibrary& library) ;
67 
69  virtual ~RotamerLibrary();
71 
75  RotamerLibrary& operator = (const RotamerLibrary& rhs);
78 
79 
83  ResidueRotamerSet* getRotamerSet(const String& name);
85 
87  ResidueRotamerSet* getRotamerSet(const String& name, float phi, float psi);
88 
90  ResidueRotamerSet* getRotamerSet(const Residue& residue);
91 
93  Size getNumberOfRotamers() const;
94 
96  Size getNumberOfRotamers(const String& name) const;
97 
99  Size getNumberOfRotamerSets() const;
100 
102  void addRotamer(const String& name, const Rotamer& rotamer, Size number_of_torsions, Index phi, Index psi);
103 
105  void addRotamer(const String& name, const Rotamer& rotamer, Size number_of_torsions);
106 
108  bool isBackboneDependent() const;
109 
111  void setBackboneDependent(bool dependent);
112 
114  bool hasRotamers(const String& name) const;
115 
117  bool validate();
118 
120  void sort();
121 
125  void clear();
127 
128  protected:
129 
133  HashMap<Index, HashMap<Index, HashMap<String, ResidueRotamerSet> > > bb_dep_sets_;
135 
137  HashMap<String, ResidueRotamerSet> bb_indep_sets_;
138 
140  Index getNearestBackboneTorsion_(double angle) const;
141 
143  Size step_width_;
144 
146  FragmentDB fragment_db_;
147 
149  bool backbone_dependent_;
151  };
152 
153 } // namespace BALL
154 
155 #endif // BALL_STRUCTURE_ROTAMERLIBRARY_H
#define BALL_CREATE(name)
Definition: create.h:62
Rotamer Library Class.
HashMap class based on the STL map (containing serveral convenience functions)
Definition: hashMap.h:73
#define BALL_EXPORT
Definition: COMMON/global.h:50