45 #ifndef CLIPPER_RAMACHANDRAN
46 #define CLIPPER_RAMACHANDRAN
49 #include "clipper_types.h"
61 void init(
const int& size );
73 const ftype&
data(
const int& i,
const int& j )
const
74 {
return data_[n*i+j]; }
77 {
return data_[n*i+j]; }
80 std::vector<ftype> data_;
97 enum TYPE { Gly, Pro, NonGlyPro, NonGly, All };
106 ftype prob_allowed = 0.0005 );
112 {
return (
probability( phi, psi ) > p_favored ); }
115 {
return (
probability( phi, psi ) > p_allowed ); }
117 ftype p_favored, p_allowed;
TYPE
enumeration of built-in Ramachandran tables
Definition: ramachandran.h:97
ftype & data(const int &i, const int &j)
2d write access
Definition: ramachandran.h:76
const ftype & data(const int &i, const int &j) const
2d read access
Definition: ramachandran.h:73
void accumulate(const ftype32 table[])
accumulate new table of samples to probability
Definition: ramachandran.cpp:392
bool favored(const ftype &phi, const ftype &psi) const
test if a pair of angles are in the favored region
Definition: ramachandran.h:111
2-d angular probability distibution class
Definition: ramachandran.h:57
ftype probability(const ftype &phi, const ftype &psi) const
get probability for a particular pair of angles
Definition: ramachandran.h:108
ftype64 ftype
ftype definition for floating point representation
Definition: clipper_precision.h:58
String format() const
formatted string representation (as C++ code)
Definition: ramachandran.cpp:449
bool allowed(const ftype &phi, const ftype &psi) const
test if a pair of angles are in the allowed region
Definition: ramachandran.h:114
String extension with simple parsing methods.
Definition: clipper_types.h:64
void normalise()
normalise to integrate to 1/(2pi)^2
Definition: ramachandran.cpp:419
ftype probability(const ftype &phi1, const ftype &phi2) const
get probability for a particular pair of angles
Definition: ramachandran.cpp:428
void set_thresholds(ftype prob_favored=0.01, ftype prob_allowed=0.0005)
change threshholds to different values
Definition: ramachandran.cpp:512
Ramachandran plot class.
Definition: ramachandran.h:93
void init(TYPE type)
initialise: from standard plot
Definition: ramachandran.cpp:475
Ramachandran()
null constructor
Definition: ramachandran.h:99
void init(const int &size)
initialise: with sampling
Definition: ramachandran.cpp:385