Loading...
Searching...
No Matches
residueRotamerSet.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_STRUCTURE_RESIDUEROTAMERSET_H
#define BALL_STRUCTURE_RESIDUEROTAMERSET_H
#ifndef BALL_MATHS_ANGLE_H
#include <BALL/MATHS/angle.h>
#endif
#ifndef BALL_DATATYPE_STRING_H
#include <BALL/DATATYPE/string.h>
#endif
#ifndef BALL_MATHS_VECTOR3_H
#include <BALL/MATHS/vector3.h>
#endif
namespace BALL
{
class Residue;
template <typename Key> class HashSet;
template <typename Key> class StringHashMap;
class Atom;
class BALL_EXPORT Rotamer
{
public:
Rotamer();
Rotamer(const Rotamer& rotamer);
Rotamer(float new_P, float new_chi1, float new_chi2 = 0.0,
float new_chi3 = 0.0, float new_chi4 = 0.0);
float P;
float chi1;
float chi2;
float chi3;
float chi4;
};
class BALL_EXPORT ResidueRotamerSet
{
public:
typedef std::vector<Rotamer>::const_iterator ConstIterator;
typedef std::vector<Rotamer>::const_iterator const_iterator;
typedef std::vector<Rotamer>::iterator Iterator;
typedef std::vector<Rotamer>::iterator iterator;
BALL_CREATE(ResidueRotamerSet)
ResidueRotamerSet();
ResidueRotamerSet(const ResidueRotamerSet& rotamer_set);
ResidueRotamerSet(const Residue& residue, Size number_of_torsions);
virtual ~ResidueRotamerSet();
Iterator begin()
{
return rotamers_.begin();
}
Iterator end()
{
return rotamers_.end();
}
ConstIterator begin() const
{
return rotamers_.begin();
}
ConstIterator end() const
{
return rotamers_.end();
}
const ResidueRotamerSet& operator = (const ResidueRotamerSet& residue_rotamer_set);
const String& getName() const;
bool isValid() const;
Size getNumberOfRotamers() const;
Size getNumberOfTorsions() const;
void setNumberOfTorsions(Size number_of_torsions);
const Rotamer& operator [] (Position index) const;
bool hasTorsionPhi() const;
Angle getTorsionPhi() const;
void setTorsionPhi(const Angle& phi);
bool hasTorsionPsi() const;
Angle getTorsionPsi() const;
void setTorsionPsi(const Angle& psi);
bool setTemplateResidue(const Residue& residue, Size number_of_torsions);
bool setRotamer(Residue& residue, const Rotamer& rotamer);
Rotamer getRotamer(const Residue& residue) const;
const Rotamer& getRotamer(Position index) const;
void setName(const String& name);
void addRotamer(const Rotamer& rotamer);
void deleteRotamer(Iterator loc);
void deleteRotamers(Iterator begin, Iterator end);
void sort();
protected:
struct RotamerProbabilityGreaterThan_
: std::binary_function<Rotamer, Rotamer, bool>
{
bool operator () (const Rotamer& r1, const Rotamer& r2)
{
return r1.P > r2.P;
}
};
void addMovable_(std::vector<String>& movable, const Atom& a, const HashSet<String>& assigned_atoms);
void setTorsionAngle_(Residue& residue, const std::vector<String>& movable, float torsion);
bool valid_;
String name_;
std::vector<Rotamer> rotamers_;
std::vector<String> movable_atoms_chi1_;
std::vector<String> movable_atoms_chi2_;
std::vector<String> movable_atoms_chi3_;
std::vector<String> movable_atoms_chi4_;
Size number_of_torsions_;
StringHashMap<Vector3> original_coordinates_;
bool has_torsion_phi_;
bool has_torsion_psi_;
Angle phi_;
Angle psi_;
};
} // namespace BALL
#endif // BALL_STRUCTURE_RESIDUEROTAMERSET_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
angle.h
BALL::Atom
Definition atom.h:90
BALL::HashSet
Definition hashSet.h:46
BALL::ResidueRotamerSet::setRotamer
bool setRotamer(Residue &residue, const Rotamer &rotamer)
BALL::ResidueRotamerSet::getName
const String & getName() const
Get the name of the ResidueRotamerSet.
BALL::ResidueRotamerSet::movable_atoms_chi3_
std::vector< String > movable_atoms_chi3_
Definition residueRotamerSet.h:288
BALL::ResidueRotamerSet::deleteRotamer
void deleteRotamer(Iterator loc)
Delete the Rotamer at the given iterator location.
BALL::ResidueRotamerSet::ResidueRotamerSet
ResidueRotamerSet()
BALL::ResidueRotamerSet::iterator
std::vector< Rotamer >::iterator iterator
Definition residueRotamerSet.h:99
BALL::ResidueRotamerSet::addMovable_
void addMovable_(std::vector< String > &movable, const Atom &a, const HashSet< String > &assigned_atoms)
BALL::ResidueRotamerSet::end
ConstIterator end() const
Definition residueRotamerSet.h:153
BALL::ResidueRotamerSet::begin
ConstIterator begin() const
Definition residueRotamerSet.h:146
BALL::ResidueRotamerSet::rotamers_
std::vector< Rotamer > rotamers_
Array containing all rotamers.
Definition residueRotamerSet.h:283
BALL::ResidueRotamerSet::setName
void setName(const String &name)
Assign a new name.
BALL::ResidueRotamerSet::setTorsionPsi
void setTorsionPsi(const Angle &psi)
BALL::ResidueRotamerSet::hasTorsionPhi
bool hasTorsionPhi() const
BALL::ResidueRotamerSet::movable_atoms_chi4_
std::vector< String > movable_atoms_chi4_
Definition residueRotamerSet.h:289
BALL::ResidueRotamerSet::hasTorsionPsi
bool hasTorsionPsi() const
BALL::ResidueRotamerSet::getTorsionPhi
Angle getTorsionPhi() const
BALL::ResidueRotamerSet::has_torsion_phi_
bool has_torsion_phi_
true if this residue rotamer set is backbone dependent
Definition residueRotamerSet.h:298
BALL::ResidueRotamerSet::deleteRotamers
void deleteRotamers(Iterator begin, Iterator end)
Delete the range of rotamers.
BALL::ResidueRotamerSet::end
Iterator end()
Definition residueRotamerSet.h:139
BALL::ResidueRotamerSet::setNumberOfTorsions
void setNumberOfTorsions(Size number_of_torsions)
BALL::ResidueRotamerSet::name_
String name_
Name of the residue (variant name).
Definition residueRotamerSet.h:280
BALL::ResidueRotamerSet::has_torsion_psi_
bool has_torsion_psi_
true if this residue rotamer set is backbone dependent
Definition residueRotamerSet.h:301
BALL::ResidueRotamerSet::addRotamer
void addRotamer(const Rotamer &rotamer)
Add a rotamer to the current set.
BALL::ResidueRotamerSet::movable_atoms_chi1_
std::vector< String > movable_atoms_chi1_
Names of the movable atoms (names) for each of the torsions.
Definition residueRotamerSet.h:286
BALL::ResidueRotamerSet::setTorsionPhi
void setTorsionPhi(const Angle &phi)
BALL::ResidueRotamerSet::phi_
Angle phi_
The torsion phi.
Definition residueRotamerSet.h:304
BALL::ResidueRotamerSet::getRotamer
const Rotamer & getRotamer(Position index) const
BALL::ResidueRotamerSet::psi_
Angle psi_
The torsion psi.
Definition residueRotamerSet.h:307
BALL::ResidueRotamerSet::getNumberOfRotamers
Size getNumberOfRotamers() const
Return the number of rotamers from this residue rotamer set.
BALL::ResidueRotamerSet::getRotamer
Rotamer getRotamer(const Residue &residue) const
BALL::ResidueRotamerSet::original_coordinates_
StringHashMap< Vector3 > original_coordinates_
Original coordinates of the template residue.
Definition residueRotamerSet.h:295
BALL::ResidueRotamerSet::getTorsionPsi
Angle getTorsionPsi() const
BALL::ResidueRotamerSet::Iterator
std::vector< Rotamer >::iterator Iterator
Definition residueRotamerSet.h:98
BALL::ResidueRotamerSet::const_iterator
std::vector< Rotamer >::const_iterator const_iterator
Definition residueRotamerSet.h:96
BALL::ResidueRotamerSet::valid_
bool valid_
Indicates whether the instance is valid.
Definition residueRotamerSet.h:277
BALL::ResidueRotamerSet::getNumberOfTorsions
Size getNumberOfTorsions() const
BALL::ResidueRotamerSet::number_of_torsions_
Size number_of_torsions_
Number of valid torsions in the side chain.
Definition residueRotamerSet.h:292
BALL::ResidueRotamerSet::movable_atoms_chi2_
std::vector< String > movable_atoms_chi2_
Definition residueRotamerSet.h:287
BALL::ResidueRotamerSet::sort
void sort()
Sort the rotamers descendingly according to their probability.
BALL::ResidueRotamerSet::setTorsionAngle_
void setTorsionAngle_(Residue &residue, const std::vector< String > &movable, float torsion)
Set the torsion angles.
BALL::ResidueRotamerSet::setTemplateResidue
bool setTemplateResidue(const Residue &residue, Size number_of_torsions)
Set the template residue, name, base coordinates ...
BALL::ResidueRotamerSet::isValid
bool isValid() const
Find out if the class instance is valid.
BALL::ResidueRotamerSet::begin
Iterator begin()
Definition residueRotamerSet.h:132
BALL::ResidueRotamerSet::ConstIterator
std::vector< Rotamer >::const_iterator ConstIterator
Definition residueRotamerSet.h:95
BALL::Residue
Definition residue.h:38
BALL::Rotamer
Definition residueRotamerSet.h:38
BALL::Rotamer::Rotamer
Rotamer()
Default constructor.
BALL::Rotamer::chi3
float chi3
Angle in degrees.
Definition residueRotamerSet.h:69
BALL::Rotamer::Rotamer
Rotamer(float new_P, float new_chi1, float new_chi2=0.0, float new_chi3=0.0, float new_chi4=0.0)
BALL::Rotamer::P
float P
Probability.
Definition residueRotamerSet.h:60
BALL::Rotamer::chi1
float chi1
Angle in degrees.
Definition residueRotamerSet.h:63
BALL::Rotamer::Rotamer
Rotamer(const Rotamer &rotamer)
Copy constructor.
BALL::Rotamer::chi4
float chi4
Angle in degrees.
Definition residueRotamerSet.h:72
BALL::Rotamer::chi2
float chi2
Angle in degrees.
Definition residueRotamerSet.h:66
BALL::StringHashMap
Definition stringHashMap.h:42
BALL::String
Definition string.h:57
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
BALL::Position
BALL_SIZE_TYPE Position
Definition COMMON/global.h:140
BALL::Angle
TAngle< float > Angle
Definition angle.h:697
string.h
BALL::ResidueRotamerSet::RotamerProbabilityGreaterThan_
Definition residueRotamerSet.h:259
vector3.h