Rosetta Core  2014.35
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
core::scoring::Ramachandran Class Reference

#include <Ramachandran.hh>

Public Types

typedef pose::Pose Pose
 
typedef chemical::AA AA
 

Public Member Functions

 Ramachandran ()
 
 Ramachandran (std::string const &rama_map_filename, bool use_bicubic_interpolation)
 
virtual ~Ramachandran ()
 
bool is_canonical_d_aminoacid (AA const res_aa) const
 Returns true if passed a core::chemical::AA corresponding to a D-amino acid, and false otherwise. More...
 
AA get_l_equivalent (AA const d_aa) const
 When passed a d-amino acid, returns the l-equivalent. Returns aa_unk otherwise. More...
 
Real eval_rama_score_residue (conformation::Residue const &res) const
 
Real eval_rama_score_residue (AA const res_aa, Real const phi, Real const psi) const
 
void eval_rama_score_residue (conformation::Residue const &res, Real &rama, Real &drama_dphi, Real &drama_dpsi) const
 
void eval_rama_score_residue (AA const res_aa, Real const phi, Real const psi, Real &rama, Real &drama_dphi, Real &drama_dpsi) const
 
void eval_rama_score_residue (bool use_bicubic_interpolation, bool rama_not_squared, AA const res_aa, Real const phi, Real const psi, Real &rama, Real &drama_dphi, Real &drama_dpsi) const
 
void eval_rama_score_residue_nonstandard_connection (core::pose::Pose const &mypose, conformation::Residue const &res, Real &rama, Real &drama_dphi, Real &drama_dpsi) const
 Function to evaluate the rama score for residues whose connection partners are not necessarily adjacent in linear sequence (e.g. for backbone-cyclized peptides). Note that this assumes that rama is being used only for scoring alpha-amino acids (L- or D-). More...
 
void random_phipsi_from_rama (AA const res_aa, Real &phi, Real &psi) const
 
void uniform_phipsi_from_allowed_rama (AA const res_aa, Real &phi, Real &psi) const
 Return a phi/psi pair picked uniformly from the regions of rama space with nonzero weight. Sampling with this method will not give a rama distribution; it will give a flat distribution in only the allowed regions of rama space. More...
 
bool phipsi_in_allowed_rama (AA const res_aa, Real phi, Real psi) const
 Return true if the given phi/psi pair is in the allowed space sampled by uniform_phipsi_from_allowed_rama. More...
 
bool phipsi_in_forbidden_rama (AA const res_aa, Real phi, Real psi) const
 Return false if the given phi/psi pair is in the allowed space sampled by uniform_phipsi_from_allowed_rama. More...
 
void random_phipsi_from_rama_by_torsion_bin (AA res_aa, Real &phi, Real &psi, conformation::ppo_torsion_bin torsion_bin) const
 functions for torsion-bin specific but otherwise random phi/psi angles More...
 
void get_entries_per_torsion_bin (AA const res_aa, std::map< conformation::ppo_torsion_bin, core::Size > &tb_frequencies) const
 
void eval_rama_score_all (Pose &pose, ScoreFunction const &scorefxn) const
 evaluate rama score for each (protein) residue and store that score in the pose.energies() object More...
 
void write_rama_score_all (Pose const &pose) const
 
bool is_normally_connected (conformation::Residue const &res) const
 Function to do a quick check that the upper connection is seqpos+1 and the lower connection is seqpos-1. Returns true if this is so, false otherwise. More...
 
Size n_phi_bins () const
 
Size n_psi_bins () const
 
Real rama_probability (core::chemical::AA aa, Real phi, Real psi) const
 
Real minimum_sampling_probability () const
 
utility::vector1< Real > const & cdf_for_aa (core::chemical::AA aa) const
 
utility::vector1< Real > const & cdf_for_aa_for_torsion_bin (chemical::AA aa, conformation::ppo_torsion_bin) const
 

Private Member Functions

void read_rama (std::string const &rama_map_filename, bool use_bicubic_interpolation)
 
void read_rama_map_file (utility::io::izstream *iunit)
 
void initialize_rama_sampling_tables ()
 
void init_rama_sampling_table (conformation::ppo_torsion_bin torsion_bin)
 
void init_uniform_sampling_table ()
 
void draw_random_phi_psi_from_cdf (utility::vector1< Real > const &cdf, Real &phi, Real &psi) const
 

Private Attributes

ObjexxFCL::FArray4D< Realram_probabil_
 
ObjexxFCL::FArray4D_int ram_counts_
 
ObjexxFCL::FArray4D< Realram_energ_
 
ObjexxFCL::FArray2D< Realram_entropy_
 
utility::vector1
< numeric::interpolation::spline::BicubicSpline
rama_energy_splines_
 
utility::vector1
< utility::vector1< Real > > 
cdf_
 
ObjexxFCL::FArray2D
< utility::vector1< Real > > 
cdf_by_torsion_bin_
 
ObjexxFCL::FArray2D< Sizen_valid_pp_bins_by_ppo_torbin_
 
utility::vector1
< utility::vector1< Size > > 
phi_psi_bins_above_thold_
 

Static Private Attributes

static int const n_phi_ = 36
 
static int const n_psi_ = 36
 
static Real const binw_
 
static Real const rama_sampling_thold_
 
static Real const rama_sampling_factor_
 
static int const n_aa_ = 20
 

Member Typedef Documentation

Constructor & Destructor Documentation

core::scoring::Ramachandran::Ramachandran ( )

References option, and read_rama().

core::scoring::Ramachandran::Ramachandran ( std::string const &  rama_map_filename,
bool  use_bicubic_interpolation 
)

References read_rama().

core::scoring::Ramachandran::~Ramachandran ( )
virtual

Member Function Documentation

utility::vector1< Real > const & core::scoring::Ramachandran::cdf_for_aa ( core::chemical::AA  aa) const

References cdf_.

utility::vector1< Real > const & core::scoring::Ramachandran::cdf_for_aa_for_torsion_bin ( chemical::AA  aa,
conformation::ppo_torsion_bin  torsion_bin 
) const

References cdf_by_torsion_bin_.

void core::scoring::Ramachandran::draw_random_phi_psi_from_cdf ( utility::vector1< Real > const &  cdf,
Real phi,
Real psi 
) const
private
void core::scoring::Ramachandran::eval_rama_score_all ( pose::Pose pose,
ScoreFunction const &  scorefxn 
) const
Real core::scoring::Ramachandran::eval_rama_score_residue ( conformation::Residue const &  res) const
Real core::scoring::Ramachandran::eval_rama_score_residue ( AA const  res_aa,
Real const  phi,
Real const  psi 
) const
void core::scoring::Ramachandran::eval_rama_score_residue ( conformation::Residue const &  res,
Real rama,
Real drama_dphi,
Real drama_dpsi 
) const
void core::scoring::Ramachandran::eval_rama_score_residue ( AA const  res_aa,
Real const  phi,
Real const  psi,
Real rama,
Real drama_dphi,
Real drama_dpsi 
) const
void core::scoring::Ramachandran::eval_rama_score_residue ( bool  use_bicubic_interpolation,
bool  rama_not_squared,
AA const  res_aa,
Real const  phi,
Real const  psi,
Real rama,
Real drama_dphi,
Real drama_dpsi 
) const
void core::scoring::Ramachandran::eval_rama_score_residue_nonstandard_connection ( core::pose::Pose const &  mypose,
conformation::Residue const &  res,
Real rama,
Real drama_dphi,
Real drama_dpsi 
) const
void core::scoring::Ramachandran::get_entries_per_torsion_bin ( AA const  res_aa,
std::map< conformation::ppo_torsion_bin, core::Size > &  tb_frequencies 
) const
core::chemical::AA core::scoring::Ramachandran::get_l_equivalent ( AA const  d_aa) const

When passed a d-amino acid, returns the l-equivalent. Returns aa_unk otherwise.

Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu)

References core::chemical::get_L_equivalent().

Referenced by eval_rama_score_residue().

void core::scoring::Ramachandran::init_rama_sampling_table ( conformation::ppo_torsion_bin  torsion_bin)
private
void core::scoring::Ramachandran::init_uniform_sampling_table ( )
private
void core::scoring::Ramachandran::initialize_rama_sampling_tables ( )
private
bool core::scoring::Ramachandran::is_canonical_d_aminoacid ( AA const  res_aa) const

Returns true if passed a core::chemical::AA corresponding to a D-amino acid, and false otherwise.

Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu)

References core::chemical::is_canonical_D_aa().

Referenced by eval_rama_score_residue().

bool core::scoring::Ramachandran::is_normally_connected ( conformation::Residue const &  res) const
Real core::scoring::Ramachandran::minimum_sampling_probability ( ) const

References rama_sampling_thold_.

Size core::scoring::Ramachandran::n_phi_bins ( ) const

References n_phi_.

Size core::scoring::Ramachandran::n_psi_bins ( ) const

References n_psi_.

bool core::scoring::Ramachandran::phipsi_in_allowed_rama ( AA const  res_aa,
Real  phi,
Real  psi 
) const

Return true if the given phi/psi pair is in the allowed space sampled by uniform_phipsi_from_allowed_rama.

return true if the bin that the given phi/psi pair falls in has a probability that exceeds the rama_sampling_thold_ constant.

References binw_, numeric::nonnegative_principal_angle_degrees(), ram_probabil_, and rama_sampling_thold_.

Referenced by phipsi_in_forbidden_rama().

bool core::scoring::Ramachandran::phipsi_in_forbidden_rama ( AA const  res_aa,
Real  phi,
Real  psi 
) const

Return false if the given phi/psi pair is in the allowed space sampled by uniform_phipsi_from_allowed_rama.

References phipsi_in_allowed_rama().

Real core::scoring::Ramachandran::rama_probability ( core::chemical::AA  aa,
Real  phi,
Real  psi 
) const
void core::scoring::Ramachandran::random_phipsi_from_rama ( AA const  res_aa,
Real phi,
Real psi 
) const

Sample phi/psi torsions with probabilities proportionate to their Ramachandran probabilities Note – this function had previously required that the option loops::nonpivot_torsion_sampling be active. This function now performs a just-in-time check to initialize these tables the first time they are requested – To properly multi-thread this code, the function should nab a mutex so that no two threads try to execute the code at once.

References cdf_, and draw_random_phi_psi_from_cdf().

void core::scoring::Ramachandran::random_phipsi_from_rama_by_torsion_bin ( AA  res_aa,
Real phi,
Real psi,
conformation::ppo_torsion_bin  torsion_bin 
) const

functions for torsion-bin specific but otherwise random phi/psi angles

Author
Amelie Stein

Sample phi/psi torsions with probabilities proportionate to their Ramachandran probabilities – this version performs lookup restricted to specified torsion bins based on random_phipsi_from_rama and has the same issue for parallel running

Author
Amelie Stein (ameli.nosp@m.e.st.nosp@m.ein@u.nosp@m.csf..nosp@m.edu)
Date
Fri May 11 15:52:01 PDT 2012

returns a random phi/psi combination within the given torsion bin – WARNING: this will only work for the torsion bins that are currently implemented

References cdf_by_torsion_bin_, and draw_random_phi_psi_from_cdf().

void core::scoring::Ramachandran::read_rama ( std::string const &  rama_map_filename,
bool  use_bicubic_interpolation 
)
private
void core::scoring::Ramachandran::read_rama_map_file ( utility::io::izstream iunit)
private
void core::scoring::Ramachandran::uniform_phipsi_from_allowed_rama ( AA const  res_aa,
Real phi,
Real psi 
) const

Return a phi/psi pair picked uniformly from the regions of rama space with nonzero weight. Sampling with this method will not give a rama distribution; it will give a flat distribution in only the allowed regions of rama space.

References binw_, n_psi_, phi_psi_bins_above_thold_, random_range(), numeric::random::random_range(), numeric::random::uniform(), and uniform().

void core::scoring::Ramachandran::write_rama_score_all ( Pose const &  pose) const

Member Data Documentation

Real const core::scoring::R::binw_
staticprivate
utility::vector1< utility::vector1< Real > > core::scoring::Ramachandran::cdf_
private
ObjexxFCL::FArray2D< utility::vector1< Real > > core::scoring::Ramachandran::cdf_by_torsion_bin_
private
int const core::scoring::Ramachandran::n_aa_ = 20
staticprivate
int const core::scoring::Ramachandran::n_phi_ = 36
staticprivate
int const core::scoring::Ramachandran::n_psi_ = 36
staticprivate
ObjexxFCL::FArray2D< Size > core::scoring::Ramachandran::n_valid_pp_bins_by_ppo_torbin_
private
utility::vector1< utility::vector1< Size > > core::scoring::Ramachandran::phi_psi_bins_above_thold_
private
ObjexxFCL::FArray4D_int core::scoring::Ramachandran::ram_counts_
private

Referenced by read_rama_map_file().

ObjexxFCL::FArray4D< Real > core::scoring::Ramachandran::ram_energ_
private

Referenced by read_rama_map_file().

ObjexxFCL::FArray2D< Real > core::scoring::Ramachandran::ram_entropy_
private
ObjexxFCL::FArray4D< Real > core::scoring::Ramachandran::ram_probabil_
private
utility::vector1< numeric::interpolation::spline::BicubicSpline > core::scoring::Ramachandran::rama_energy_splines_
private
Real const core::scoring::R::rama_sampling_factor_
staticprivate
Real const core::scoring::R::rama_sampling_thold_
staticprivate

The documentation for this class was generated from the following files: