Loading...
Searching...
No Matches
rotamerLibrary.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_STRUCTURE_ROTAMERLIBRARY_H
#define BALL_STRUCTURE_ROTAMERLIBRARY_H
#ifndef BALL_STRUCTURE_FRAGMENT_DB_H
# include <BALL/STRUCTURE/fragmentDB.h>
#endif
#ifndef BALL_STRUCTURE_RESIDUEROTAMERSET_H
#include <BALL/STRUCTURE/residueRotamerSet.h>
#endif
#ifndef BALL_DATATYPE_HASHMAP_H
#include <BALL/DATATYPE/hasMap.h>
#endif
//#include <map>
namespace BALL
{
class FragmentDB;
class String;
class BALL_EXPORT RotamerLibrary
{
public:
BALL_CREATE(RotamerLibrary)
static const String DEFAULT_LIBRARY;
static const String DEFAULT_FRAGMENT_DB;
RotamerLibrary() ;
RotamerLibrary(const String& filename, const FragmentDB& fragment_db) ;
RotamerLibrary(const FragmentDB& fragment_db) ;
RotamerLibrary(const RotamerLibrary& library) ;
virtual ~RotamerLibrary();
RotamerLibrary& operator = (const RotamerLibrary& rhs);
ResidueRotamerSet* getRotamerSet(const String& name);
ResidueRotamerSet* getRotamerSet(const String& name, float phi, float psi);
ResidueRotamerSet* getRotamerSet(const Residue& residue);
Size getNumberOfRotamers() const;
Size getNumberOfRotamers(const String& name) const;
Size getNumberOfRotamerSets() const;
void addRotamer(const String& name, const Rotamer& rotamer, Size number_of_torsions, Index phi, Index psi);
void addRotamer(const String& name, const Rotamer& rotamer, Size number_of_torsions);
bool isBackboneDependent() const;
void setBackboneDependent(bool dependent);
bool hasRotamers(const String& name) const;
bool validate();
void sort();
void clear();
protected:
HashMap<Index, HashMap<Index, HashMap<String, ResidueRotamerSet> > > bb_dep_sets_;
HashMap<String, ResidueRotamerSet> bb_indep_sets_;
Index getNearestBackboneTorsion_(double angle) const;
Size step_width_;
FragmentDB fragment_db_;
bool backbone_dependent_;
};
} // namespace BALL
#endif // BALL_STRUCTURE_ROTAMERLIBRARY_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
BALL::FragmentDB
Definition fragmentDB.h:45
BALL::HashMap
HashMap class based on the STL map (containing serveral convenience functions).
Definition hashMap.h:74
BALL::ResidueRotamerSet
Definition residueRotamerSet.h:88
BALL::Residue
Definition residue.h:38
BALL::RotamerLibrary::RotamerLibrary
RotamerLibrary()
BALL::RotamerLibrary::getNumberOfRotamers
Size getNumberOfRotamers() const
Return total number of rotamers.
BALL::RotamerLibrary::addRotamer
void addRotamer(const String &name, const Rotamer &rotamer, Size number_of_torsions, Index phi, Index psi)
adds rotamer with specific phi/psi backbone torsion
BALL::RotamerLibrary::sort
void sort()
method to sort the Rotamers of each ResidueRotamerSet descendingly according to the probability
BALL::RotamerLibrary::getNumberOfRotamerSets
Size getNumberOfRotamerSets() const
returns the number of rotamer sets
BALL::RotamerLibrary::DEFAULT_LIBRARY
static const String DEFAULT_LIBRARY
Rotamer library used when calling the default constructor.
Definition rotamerLibrary.h:44
BALL::RotamerLibrary::step_width_
Size step_width_
discretization step width of the torsion angles
Definition rotamerLibrary.h:143
BALL::RotamerLibrary::setBackboneDependent
void setBackboneDependent(bool dependent)
sets whether the rotamers are backbone dependent or not
BALL::RotamerLibrary::DEFAULT_FRAGMENT_DB
static const String DEFAULT_FRAGMENT_DB
Fragment DB used when calling the default constructor.
Definition rotamerLibrary.h:47
BALL::RotamerLibrary::validate
bool validate()
method to test the validity of this library, typically called after the building (see SCWRLLibraryFil...
BALL::RotamerLibrary::bb_indep_sets_
HashMap< String, ResidueRotamerSet > bb_indep_sets_
Contains the available variants (name, rotamer set) in case of bb indep.
Definition rotamerLibrary.h:137
BALL::RotamerLibrary::clear
void clear()
BALL::RotamerLibrary::bb_dep_sets_
HashMap< Index, HashMap< Index, HashMap< String, ResidueRotamerSet > > > bb_dep_sets_
Contains the available variants (phi, psi, name, rotamer set) in case of bb dep.
Definition rotamerLibrary.h:134
BALL::RotamerLibrary::isBackboneDependent
bool isBackboneDependent() const
returns true if the rotamers are backbone dependent
BALL::RotamerLibrary::getRotamerSet
ResidueRotamerSet * getRotamerSet(const String &name)
Return the residue set of the residue name.
BALL::RotamerLibrary::backbone_dependent_
bool backbone_dependent_
flag which is true when the library has backbone dependent rotamers
Definition rotamerLibrary.h:149
BALL::RotamerLibrary::getNearestBackboneTorsion_
Index getNearestBackboneTorsion_(double angle) const
BALL::RotamerLibrary::hasRotamers
bool hasRotamers(const String &name) const
returns true if the library contains rotamers with this name
BALL::RotamerLibrary::fragment_db_
FragmentDB fragment_db_
fragment db used in this class
Definition rotamerLibrary.h:146
BALL::Rotamer
Definition residueRotamerSet.h:38
BALL::String
Definition string.h:57
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
fragmentDB.h
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
BALL::Index
BALL_INDEX_TYPE Index
Definition COMMON/global.h:105
residueRotamerSet.h