9 #ifndef IMPROTAMER_ROTAMER_LIBRARY_H
10 #define IMPROTAMER_ROTAMER_LIBRARY_H
14 #include <boost/range/iterator_range.hpp>
15 #include <cereal/access.hpp>
18 #include <IMP/rotamer/rotamer_config.h>
20 IMPROTAMER_BEGIN_NAMESPACE
27 : chi1_(0), chi2_(0), chi3_(0), chi4_(0), probability_(0) {}
37 probability_(probability) {}
55 out <<
"RotamerAngleTuple: " << chi1_ <<
' ' << chi2_ <<
' ' << chi3_ <<
' '
56 << chi4_ <<
' ' << probability_;
66 friend class cereal::access;
68 template<
class Archive>
void serialize(Archive &ar) {
69 ar(chi1_, chi2_, chi3_, chi4_, probability_);
83 typedef RotamerAngleTuples::const_iterator RotamerIterator;
84 typedef boost::iterator_range<RotamerIterator> RotamerRange;
105 float psi,
float probability_thr)
const;
118 float psi,
float probability_thr)
const;
122 void read_library_file(
const std::string &lib_file_name);
127 unsigned backbone_angle_to_index(
float phi,
float psi)
const;
129 typedef std::vector<RotamerAngleTuples> RotamerAngleTuplesByBackbone;
130 typedef std::vector<RotamerAngleTuplesByBackbone> RotamersByResidue;
131 RotamersByResidue library_;
133 unsigned angle_step_;
134 unsigned rotamers_by_backbone_size_;
137 IMPROTAMER_END_NAMESPACE
float get_chi2() const
query the chi2 angle
float get_probability() const
query the probability
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
RotamerAngleTuple(float chi1, float chi2, float chi3, float chi4, float probability)
constructor. build rotamer data corresponding to 1 line from
float get_chi3() const
query the chi3 angle
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
A class storing a whole rotamer library read from a file.
A more IMP-like version of the std::vector.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
A simple class storing chi angles and their probability.
Common base class for heavy weight IMP objects.
A decorator for Residues.
A shared base class to help in debugging and things.
RotamerAngleTuple()
default constructor. Build identity rotations with zero probability
float get_chi1() const
query the chi1 angle
float get_chi4() const
query the chi4 angle