Rosetta
|
#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 () |
std::string | get_custom_rama_table_filename (Rama_Table_Type const type) const |
Given a custom Rama table type, get the filename of the database file containing the data. More... | |
Rama_Table_Type | get_ramatable_type_by_name (std::string const &name) const |
Given a Rama_Table_Type name, return the type. More... | |
std::string | get_ramatable_name_by_type (Rama_Table_Type const type) const |
Given a Rama_Table_Type, return the name. More... | |
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 |
Generate random values for phi and psi, biased by the Ramachandran plot of a particular amino acid. More... | |
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 |
void | draw_random_phi_psi_from_extra_cdf (Rama_Table_Type const type, Real &phi, Real &psi) |
Pick a random phi, psi value from a custom Rama table. More... | |
Private Member Functions | |
void | read_rama (std::string const &rama_map_filename, bool use_bicubic_interpolation) |
void | load_custom_rama_table (Rama_Table_Type const type) |
Load a custom Ramachandran table, in addition to the 20x3 standard ones that are always loaded. More... | |
void | symmetrize_gly_table () |
If the -symmetric_gly_tables option is used, symmetrize the aa_gly table. More... | |
void | read_rama_map_file (utility::io::izstream *iunit) |
void | read_rama_map_file_shapovalov (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 |
Pick a random phi and psi value given a cumulative distribution function. More... | |
bool | has_custom_rama_probability_table (Rama_Table_Type const type) const |
Has a particular custom Rama probability table been loaded? More... | |
bool | has_custom_rama_count_table (Rama_Table_Type const type) const |
Has a particular custom Rama count table been loaded? More... | |
bool | has_custom_rama_energy_table (Rama_Table_Type const type) const |
Has a particular custom Rama energy table been loaded? More... | |
bool | has_custom_rama_cdf (Rama_Table_Type const type) const |
Has a particular custom Rama cumulative distribution function been generated? More... | |
void | generate_custom_rama_cdf (Rama_Table_Type const type) |
Generate a custom Rama cumulative distribution function from the corresponding energy table. More... | |
utility::vector1< core::Real > const & | custom_rama_cdf (Rama_Table_Type const type) const |
Get a custom (extra) cumulative distribution function (CDF). More... | |
core::Real const & | custom_rama_probability_table (Rama_Table_Type const type, core::Size const phi, core::Size const psi) const |
Get a custom (extra) rama probability table. More... | |
Private Attributes | |
ObjexxFCL::FArray4D< Real > | ram_probabil_ |
The Ramachandran probability tables. More... | |
std::map< Rama_Table_Type, utility::vector1 < utility::vector1< core::Real > > > | extra_ram_probabil_ |
Extra Ramachandran count tables. More... | |
ObjexxFCL::FArray4D_int | ram_counts_ |
The Ramachandran count tables. More... | |
std::map< Rama_Table_Type, utility::vector1 < utility::vector1< core::Size > > > | extra_ram_counts_ |
Extra Ramachandran count tables. More... | |
ObjexxFCL::FArray4D< Real > | ram_energ_ |
The Ramachandran energy tables. More... | |
std::map< Rama_Table_Type, utility::vector1 < utility::vector1< core::Real > > > | extra_ram_energ_ |
Extra Ramachandran energy tables. More... | |
ObjexxFCL::FArray2D< Real > | ram_entropy_ |
utility::vector1 < numeric::interpolation::spline::BicubicSpline > | rama_energy_splines_ |
utility::vector1 < utility::vector1< Real > > | cdf_ |
The cumulative distribution functions (CDF) for all phi/psi bins for each amino acid. More... | |
std::map< Rama_Table_Type, utility::vector1< Real > > | extra_cdf_ |
Additional cumulative distribution functions (CDFs). More... | |
ObjexxFCL::FArray2D < utility::vector1< Real > > | cdf_by_torsion_bin_ |
ObjexxFCL::FArray2D< Size > | n_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 |
Definition at line 68 of file Ramachandran.hh.
Definition at line 72 of file Ramachandran.hh.
Definition at line 71 of file Ramachandran.hh.
core::scoring::Ramachandran::Ramachandran | ( | ) |
Definition at line 87 of file Ramachandran.cc.
References read_rama(), and core::scoring::TR().
core::scoring::Ramachandran::Ramachandran | ( | std::string const & | rama_map_filename, |
bool | use_bicubic_interpolation | ||
) |
Definition at line 133 of file Ramachandran.cc.
References read_rama().
|
virtual |
Definition at line 78 of file Ramachandran.cc.
utility::vector1< Real > const & core::scoring::Ramachandran::cdf_for_aa | ( | core::chemical::AA | aa | ) | const |
Definition at line 736 of file Ramachandran.cc.
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 |
Definition at line 742 of file Ramachandran.cc.
References cdf_by_torsion_bin_.
|
inlineprivate |
Get a custom (extra) cumulative distribution function (CDF).
This function is const. The CDF must already have been generated.
Definition at line 358 of file Ramachandran.hh.
References extra_cdf_, and has_custom_rama_cdf().
Referenced by draw_random_phi_psi_from_extra_cdf().
|
inlineprivate |
Get a custom (extra) rama probability table.
This function is const. The probability table must already have been loaded. To keep this consistent with the older Rama probability tables, the phi- and psi-indices are zero-based (running from 0 to 35).
Definition at line 367 of file Ramachandran.hh.
References extra_ram_probabil_, has_custom_rama_probability_table(), n_phi_, and n_psi_.
Referenced by generate_custom_rama_cdf().
|
private |
Pick a random phi and psi value given a cumulative distribution function.
[in] | cdf | The cumulative distribution function. |
[out] | phi | The output phi value. |
[out] | psi | The output psi value. |
A random bin from the cumulative distribution function is chosen first. Then uniform randomness is added within the chosen bin to produce the final phi and psi values.
Definition at line 1254 of file Ramachandran.cc.
References binw_, n_phi_, n_psi_, and core::scoring::rg.
Referenced by draw_random_phi_psi_from_extra_cdf(), random_phipsi_from_rama(), and random_phipsi_from_rama_by_torsion_bin().
void core::scoring::Ramachandran::draw_random_phi_psi_from_extra_cdf | ( | Rama_Table_Type const | type, |
Real & | phi, | ||
Real & | psi | ||
) |
Pick a random phi, psi value from a custom Rama table.
The custom Rama table is lazily loaded, so this function is necessarily non-const. By default, only the 20 canonical Rama tables are loaded.
[in] | type | The type of custom rama table (an enum value). |
[out] | phi | Randomly-drawn phi value, biased by the custom rama table. |
[out] | psi | Randomly-drawn psi value, biased by the custom rama table. |
Definition at line 761 of file Ramachandran.cc.
References custom_rama_cdf(), draw_random_phi_psi_from_cdf(), core::scoring::flat_d_aa_ramatable, core::scoring::flat_d_aa_ramatable_stringent, core::scoring::flat_l_aa_ramatable, core::scoring::flat_l_aa_ramatable_stringent, generate_custom_rama_cdf(), and has_custom_rama_cdf().
Referenced by protocols::simple_moves::SetTorsion::apply(), and protocols::cyclic_peptide_predict::SimpleCycpepPredictApplication::set_mainchain_torsions().
void core::scoring::Ramachandran::eval_rama_score_all | ( | pose::Pose & | pose, |
ScoreFunction const & | scorefxn | ||
) | const |
evaluate rama score for each (protein) residue and store that score in the pose.energies() object
Definition at line 272 of file Ramachandran.cc.
References core::pose::Pose::energies(), eval_rama_score_residue(), eval_rama_score_residue_nonstandard_connection(), core::scoring::ScoreFunction::has_zero_weight(), is_normally_connected(), core::conformation::Residue::is_protein(), core::conformation::Residue::is_terminus(), core::conformation::Residue::is_virtual_residue(), core::scoring::rama, core::pose::Pose::residue(), and core::pose::Pose::total_residue().
Real core::scoring::Ramachandran::eval_rama_score_residue | ( | conformation::Residue const & | res | ) | const |
Definition at line 501 of file Ramachandran.cc.
References core::scoring::rama.
Referenced by core::scoring::methods::RamachandranEnergy::eval_dof_derivative(), eval_rama_score_all(), eval_rama_score_residue(), eval_rama_score_residue_nonstandard_connection(), core::scoring::methods::RamachandranEnergy::eval_residue_dof_derivative(), protocols::stepwise::modeler::protein::StepWiseProteinBackboneSampler::get_main_chain_torsion_set_list_c_terminus(), protocols::stepwise::modeler::protein::StepWiseProteinBackboneSampler::get_main_chain_torsion_set_list_full(), protocols::stepwise::modeler::protein::StepWiseProteinBackboneSampler::get_main_chain_torsion_set_list_n_terminus(), protocols::stepwise::modeler::protein::StepWiseProteinBackboneSampler::get_main_chain_torsion_set_list_sample_phi_only(), protocols::stepwise::modeler::protein::StepWiseProteinBackboneSampler::get_main_chain_torsion_set_list_sample_psi_only(), protocols::simple_moves::SmallMover::make_move(), protocols::simple_moves::ShearMover::make_move(), and core::scoring::methods::RamachandranEnergy::residue_energy().
Real core::scoring::Ramachandran::eval_rama_score_residue | ( | AA const | res_aa, |
Real const | phi, | ||
Real const | psi | ||
) | const |
Definition at line 561 of file Ramachandran.cc.
References eval_rama_score_residue(), and core::scoring::rama.
void core::scoring::Ramachandran::eval_rama_score_residue | ( | conformation::Residue const & | res, |
Real & | rama, | ||
Real & | drama_dphi, | ||
Real & | drama_dpsi | ||
) | const |
Definition at line 512 of file Ramachandran.cc.
References core::conformation::Residue::aa(), core::chemical::aa_unk, core::conformation::Residue::backbone_aa(), eval_rama_score_residue(), is_normally_connected(), core::conformation::Residue::is_protein(), core::conformation::Residue::is_terminus(), core::conformation::Residue::is_virtual_residue(), and core::conformation::Residue::mainchain_torsion().
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 |
Definition at line 574 of file Ramachandran.cc.
References eval_rama_score_residue().
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 |
Definition at line 592 of file Ramachandran.cc.
References binw_, get_l_equivalent(), is_canonical_d_aminoacid(), n_phi_, ram_entropy_, ram_probabil_, core::scoring::rama, and rama_energy_splines_.
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 |
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-).
Definition at line 453 of file Ramachandran.cc.
References core::conformation::Residue::aa(), core::chemical::aa_unk, core::conformation::Residue::backbone_aa(), core::conformation::Residue::connection_incomplete(), eval_rama_score_residue(), core::pose::Pose::residue(), core::conformation::Residue::residue_connect_atom_index(), core::conformation::Residue::residue_connection_conn_id(), core::conformation::Residue::residue_connection_partner(), and core::conformation::Residue::xyz().
Referenced by protocols::generalized_kinematic_closure::filter::GeneralizedKICfilter::apply_alpha_aa_rama_check(), core::scoring::methods::RamachandranEnergy::eval_dof_derivative(), eval_rama_score_all(), core::scoring::methods::RamachandranEnergy::eval_residue_dof_derivative(), and core::scoring::methods::RamachandranEnergy::residue_energy().
|
private |
Generate a custom Rama cumulative distribution function from the corresponding energy table.
This is generated from the ENERGY table, not from the COUNTS. If the energy table has not been loaded, this function loads the energy table first.
This is generated from the PROBABILITY table, not from the ENERGY table. If the energy table has not been loaded, this function loads the energy table first.
Definition at line 1279 of file Ramachandran.cc.
References custom_rama_probability_table(), extra_cdf_, has_custom_rama_probability_table(), load_custom_rama_table(), n_phi_, n_psi_, and core::scoring::unknown_ramatable_type.
Referenced by draw_random_phi_psi_from_extra_cdf().
std::string core::scoring::Ramachandran::get_custom_rama_table_filename | ( | Rama_Table_Type const | type | ) | const |
Given a custom Rama table type, get the filename of the database file containing the data.
Accesses the options system for this information.
Definition at line 158 of file Ramachandran.cc.
References core::scoring::flat_d_aa_ramatable, core::scoring::flat_d_aa_ramatable_stringent, core::scoring::flat_l_aa_ramatable, core::scoring::flat_l_aa_ramatable_stringent, core::scoring::flat_symm_dl_aa_ramatable, core::scoring::flat_symm_dl_aa_ramatable_stringent, core::scoring::flat_symm_gly_ramatable, core::scoring::flat_symm_gly_ramatable_stringent, core::scoring::flat_symm_pro_ramatable, and core::scoring::flat_symm_pro_ramatable_stringent.
Referenced by load_custom_rama_table().
void core::scoring::Ramachandran::get_entries_per_torsion_bin | ( | AA const | res_aa, |
std::map< conformation::ppo_torsion_bin, core::Size > & | tb_frequencies | ||
) | const |
Definition at line 438 of file Ramachandran.cc.
References phi_psi_bins_above_thold_, core::conformation::ppo_torbin_A, core::conformation::ppo_torbin_B, core::conformation::ppo_torbin_E, core::conformation::ppo_torbin_G, and core::conformation::ppo_torbin_X.
Referenced by protocols::loops::loop_closure::kinematic_closure::TabooSamplingKinematicPerturber::get_entries_per_torsion_bin().
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.
Definition at line 260 of file Ramachandran.cc.
References core::chemical::get_L_equivalent().
Referenced by eval_rama_score_residue(), and random_phipsi_from_rama().
std::string core::scoring::Ramachandran::get_ramatable_name_by_type | ( | Rama_Table_Type const | type | ) | const |
Given a Rama_Table_Type, return the name.
Definition at line 212 of file Ramachandran.cc.
References core::scoring::flat_d_aa_ramatable, core::scoring::flat_d_aa_ramatable_stringent, core::scoring::flat_l_aa_ramatable, core::scoring::flat_l_aa_ramatable_stringent, core::scoring::flat_symm_dl_aa_ramatable, core::scoring::flat_symm_dl_aa_ramatable_stringent, core::scoring::flat_symm_gly_ramatable, core::scoring::flat_symm_gly_ramatable_stringent, core::scoring::flat_symm_pro_ramatable, and core::scoring::flat_symm_pro_ramatable_stringent.
Referenced by protocols::cyclic_peptide_predict::SimpleCycpepPredictApplication::get_rama_table_type_from_name(), get_ramatable_type_by_name(), load_custom_rama_table(), and protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::set_custom_rama_table().
Rama_Table_Type core::scoring::Ramachandran::get_ramatable_type_by_name | ( | std::string const & | name | ) | const |
Given a Rama_Table_Type name, return the type.
Calls get_rama_table_name_by_type().
Calls get_ramatable_name_by_type().
Definition at line 198 of file Ramachandran.cc.
References core::scoring::end_of_ramatable_type_list, get_ramatable_name_by_type(), and core::scoring::unknown_ramatable_type.
Referenced by protocols::simple_moves::SetTorsion::apply(), protocols::cyclic_peptide_predict::SimpleCycpepPredictApplication::get_rama_table_type_from_name(), and protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::set_custom_rama_table().
|
inlineprivate |
Has a particular custom Rama cumulative distribution function been generated?
Custom Rama tables are lazily loaded, and cumulative distribution functions are lazily generated.
Definition at line 345 of file Ramachandran.hh.
References extra_cdf_, core::scoring::flat_d_aa_ramatable, and core::scoring::flat_l_aa_ramatable.
Referenced by custom_rama_cdf(), and draw_random_phi_psi_from_extra_cdf().
|
inlineprivate |
Has a particular custom Rama count table been loaded?
Custom Rama tables are lazily loaded.
Definition at line 331 of file Ramachandran.hh.
References extra_ram_counts_, core::scoring::flat_d_aa_ramatable, and core::scoring::flat_l_aa_ramatable.
Referenced by load_custom_rama_table().
|
inlineprivate |
Has a particular custom Rama energy table been loaded?
Custom Rama tables are lazily loaded.
Definition at line 338 of file Ramachandran.hh.
References extra_ram_energ_, core::scoring::flat_d_aa_ramatable, and core::scoring::flat_l_aa_ramatable.
Referenced by load_custom_rama_table().
|
inlineprivate |
Has a particular custom Rama probability table been loaded?
Custom Rama tables are lazily loaded.
Definition at line 324 of file Ramachandran.hh.
References extra_ram_probabil_, core::scoring::flat_d_aa_ramatable, and core::scoring::flat_l_aa_ramatable.
Referenced by custom_rama_probability_table(), generate_custom_rama_cdf(), and load_custom_rama_table().
|
private |
Definition at line 1159 of file Ramachandran.cc.
References binw_, cdf_, cdf_by_torsion_bin_, core::conformation::get_torsion_bin(), n_aa_, n_phi_, n_psi_, n_valid_pp_bins_by_ppo_torbin_, core::conformation::ppo_torbin_X, ram_probabil_, and rama_sampling_thold_.
Referenced by initialize_rama_sampling_tables().
|
private |
Definition at line 1228 of file Ramachandran.cc.
References n_aa_, n_phi_, n_psi_, phi_psi_bins_above_thold_, ram_probabil_, and rama_sampling_thold_.
Referenced by initialize_rama_sampling_tables().
|
private |
Definition at line 1147 of file Ramachandran.cc.
References init_rama_sampling_table(), init_uniform_sampling_table(), core::conformation::ppo_torbin_A, core::conformation::ppo_torbin_B, core::conformation::ppo_torbin_E, core::conformation::ppo_torbin_G, and core::conformation::ppo_torbin_X.
Referenced by read_rama().
Returns true if passed a core::chemical::AA corresponding to a D-amino acid, and false otherwise.
Definition at line 248 of file Ramachandran.cc.
References core::chemical::is_canonical_D_aa().
Referenced by eval_rama_score_residue(), and random_phipsi_from_rama().
bool core::scoring::Ramachandran::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.
Definition at line 702 of file Ramachandran.cc.
References core::conformation::Residue::connect_map_size(), core::conformation::Residue::connection_incomplete(), core::conformation::Residue::is_lower_terminus(), core::conformation::Residue::is_upper_terminus(), core::conformation::Residue::residue_connection_partner(), and core::conformation::Residue::seqpos().
Referenced by core::scoring::methods::RamachandranEnergy::eval_dof_derivative(), eval_rama_score_all(), eval_rama_score_residue(), core::scoring::methods::RamachandranEnergy::eval_residue_dof_derivative(), and core::scoring::methods::RamachandranEnergy::residue_energy().
|
private |
Load a custom Ramachandran table, in addition to the 20x3 standard ones that are always loaded.
Definition at line 1062 of file Ramachandran.cc.
References extra_ram_counts_, extra_ram_energ_, extra_ram_probabil_, protocols::abinitio::filename(), get_custom_rama_table_filename(), get_ramatable_name_by_type(), has_custom_rama_count_table(), has_custom_rama_energy_table(), has_custom_rama_probability_table(), n_phi_, n_psi_, and core::scoring::TR().
Referenced by generate_custom_rama_cdf().
Real core::scoring::Ramachandran::minimum_sampling_probability | ( | ) | const |
Definition at line 730 of file Ramachandran.cc.
References rama_sampling_thold_.
Size core::scoring::Ramachandran::n_phi_bins | ( | ) | const |
Definition at line 718 of file Ramachandran.cc.
References n_phi_.
Referenced by core::scoring::bin_transitions::BinTransitionData::set_up_subbins().
Size core::scoring::Ramachandran::n_psi_bins | ( | ) | const |
Definition at line 720 of file Ramachandran.cc.
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.
Definition at line 391 of file Ramachandran.cc.
References binw_, 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.
Definition at line 407 of file Ramachandran.cc.
References phipsi_in_allowed_rama().
Real core::scoring::Ramachandran::rama_probability | ( | core::chemical::AA | aa, |
Real | phi, | ||
Real | psi | ||
) | const |
Definition at line 722 of file Ramachandran.cc.
References binw_, and ram_probabil_.
Referenced by core::scoring::bin_transitions::BinTransitionData::set_up_subbins().
void core::scoring::Ramachandran::random_phipsi_from_rama | ( | AA const | res_aa, |
Real & | phi, | ||
Real & | psi | ||
) | const |
Generate random values for phi and psi, biased by the Ramachandran plot of a particular amino acid.
[in] | res_aa | The amino acid in question. |
[out] | phi | Output phi value. |
[out] | psi | Output psi value. |
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. Note2 – this function has been hackily patched to allow it to be used for D-amino acids. (VKM – 21 Aug 2014).
Definition at line 350 of file Ramachandran.cc.
References cdf_, draw_random_phi_psi_from_cdf(), get_l_equivalent(), and is_canonical_d_aminoacid().
Referenced by protocols::simple_moves::SetTorsion::apply(), protocols::hybridization::BackboneTorsionSampler::perturb(), protocols::hybridization::BackboneTorsionPerturbation::perturb(), protocols::loops::loop_closure::kinematic_closure::TorsionSamplingKinematicPerturber::perturb_chain(), protocols::kinematic_closure::perturbers::RamaPerturber::perturb_subset(), and protocols::cyclic_peptide_predict::SimpleCycpepPredictApplication::set_mainchain_torsions().
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
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
returns a random phi/psi combination within the given torsion bin – WARNING: this will only work for the torsion bins that are currently implemented
Definition at line 426 of file Ramachandran.cc.
References cdf_by_torsion_bin_, and draw_random_phi_psi_from_cdf().
Referenced by protocols::loops::loop_closure::kinematic_closure::TabooSamplingKinematicPerturber::get_random_phi_psi_for_residue(), and protocols::loops::loop_closure::kinematic_closure::TorsionRestrictedKinematicPerturber::perturb_chain().
|
private |
Definition at line 967 of file Ramachandran.cc.
References initialize_rama_sampling_tables(), core::chemical::num_canonical_aas, ram_entropy_, ram_probabil_, rama_energy_splines_, read_rama_map_file(), read_rama_map_file_shapovalov(), and symmetrize_gly_table().
Referenced by Ramachandran().
|
private |
Definition at line 895 of file Ramachandran.cc.
References n_aa_, ram_counts_, ram_energ_, ram_entropy_, and ram_probabil_.
Referenced by read_rama().
|
private |
Definition at line 1311 of file Ramachandran.cc.
References core::chemical::aa_from_name(), ram_energ_, ram_entropy_, ram_probabil_, and core::scoring::TR().
Referenced by read_rama().
|
private |
If the -symmetric_gly_tables option is used, symmetrize the aa_gly table.
By default, the gly table is asymmetric because it is based on statistics from the PDB (which disproportionately put glycine in the D-amino acid region of Ramachandran space). However, the intrinsic propensities of glycine make it equally inclined to favour right- or left-handed conformation. (Glycine is achrial, and can't have a preference.) Must be called AFTER gly table load, but prior to bicubic interpolation setup. Note that symmetrization is based on the probability table, and carries over to the energy table; the counts table is left as-is (asymmetric).
Definition at line 798 of file Ramachandran.cc.
References core::chemical::aa_gly, n_phi_, n_psi_, ram_energ_, ram_entropy_, ram_probabil_, and core::scoring::TR().
Referenced by read_rama().
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.
Definition at line 369 of file Ramachandran.cc.
References binw_, n_psi_, and phi_psi_bins_above_thold_.
Referenced by protocols::kinematic_closure::perturbers::RamaPerturber::perturb_subset_with_balance().
void core::scoring::Ramachandran::write_rama_score_all | ( | Pose const & | pose | ) | const |
Definition at line 334 of file Ramachandran.cc.
|
staticprivate |
Definition at line 417 of file Ramachandran.hh.
Referenced by draw_random_phi_psi_from_cdf(), eval_rama_score_residue(), init_rama_sampling_table(), phipsi_in_allowed_rama(), rama_probability(), and uniform_phipsi_from_allowed_rama().
|
private |
The cumulative distribution functions (CDF) for all phi/psi bins for each amino acid.
Definition at line 424 of file Ramachandran.hh.
Referenced by cdf_for_aa(), init_rama_sampling_table(), and random_phipsi_from_rama().
|
private |
Definition at line 436 of file Ramachandran.hh.
Referenced by cdf_for_aa_for_torsion_bin(), init_rama_sampling_table(), and random_phipsi_from_rama_by_torsion_bin().
|
private |
Additional cumulative distribution functions (CDFs).
Used for several things. For example, for storing CDFs for flat L-alpha amino acid sampling.
Definition at line 429 of file Ramachandran.hh.
Referenced by custom_rama_cdf(), generate_custom_rama_cdf(), and has_custom_rama_cdf().
|
private |
Extra Ramachandran count tables.
This is a map of (energy table type -> 2D array of counts by phi, psi).
Definition at line 396 of file Ramachandran.hh.
Referenced by has_custom_rama_count_table(), and load_custom_rama_table().
|
private |
Extra Ramachandran energy tables.
This is a map of (energy table type -> 2D array of energies by phi, psi).
Definition at line 407 of file Ramachandran.hh.
Referenced by has_custom_rama_energy_table(), and load_custom_rama_table().
|
private |
Extra Ramachandran count tables.
This is a map of (energy table type -> 2D array of probabilities by phi, psi).
Definition at line 385 of file Ramachandran.hh.
Referenced by custom_rama_probability_table(), has_custom_rama_probability_table(), and load_custom_rama_table().
|
staticprivate |
Definition at line 420 of file Ramachandran.hh.
Referenced by init_rama_sampling_table(), init_uniform_sampling_table(), and read_rama_map_file().
|
staticprivate |
Definition at line 415 of file Ramachandran.hh.
Referenced by custom_rama_probability_table(), draw_random_phi_psi_from_cdf(), eval_rama_score_residue(), generate_custom_rama_cdf(), init_rama_sampling_table(), init_uniform_sampling_table(), load_custom_rama_table(), n_phi_bins(), and symmetrize_gly_table().
|
staticprivate |
Definition at line 416 of file Ramachandran.hh.
Referenced by custom_rama_probability_table(), draw_random_phi_psi_from_cdf(), generate_custom_rama_cdf(), init_rama_sampling_table(), init_uniform_sampling_table(), load_custom_rama_table(), n_psi_bins(), symmetrize_gly_table(), and uniform_phipsi_from_allowed_rama().
|
private |
Definition at line 439 of file Ramachandran.hh.
Referenced by init_rama_sampling_table().
|
private |
Definition at line 442 of file Ramachandran.hh.
Referenced by get_entries_per_torsion_bin(), init_uniform_sampling_table(), and uniform_phipsi_from_allowed_rama().
|
private |
The Ramachandran count tables.
This is a FORTRAN-style 4D array. The first two dimensions are for phi and psi, respectively. The third is for secondary structure (helix, sheet, loop), though only the loop values are used nowadays. The fourth is for the amino acid type (20 entries). This is another horrible data structure that should be replaced by something much more intuitive.
Definition at line 392 of file Ramachandran.hh.
Referenced by read_rama_map_file().
|
private |
The Ramachandran energy tables.
This is a FORTRAN-style 4D array. The first two dimensions are for phi and psi, respectively. The third is for secondary structure (helix, sheet, loop), though only the loop values are used nowadays. The fourth is for the amino acid type (20 entries). This is also a horrible data structure that should be replaced by something much more intuitive.
Definition at line 403 of file Ramachandran.hh.
Referenced by read_rama_map_file(), read_rama_map_file_shapovalov(), and symmetrize_gly_table().
|
private |
Definition at line 409 of file Ramachandran.hh.
Referenced by eval_rama_score_residue(), read_rama(), read_rama_map_file(), read_rama_map_file_shapovalov(), and symmetrize_gly_table().
|
private |
The Ramachandran probability tables.
This is a FORTRAN-style 4D array. The first two dimensions are for phi and psi, respectively. The third is for secondary structure (helix, sheet, loop), though only the loop values are used nowadays. The fourth is for the amino acid type (20 entries). This is a horrible data structure that should be replaced by something much more intuitive.
Definition at line 372 of file Ramachandran.hh.
Referenced by eval_rama_score_residue(), init_rama_sampling_table(), init_uniform_sampling_table(), phipsi_in_allowed_rama(), rama_probability(), read_rama(), read_rama_map_file(), read_rama_map_file_shapovalov(), and symmetrize_gly_table().
|
private |
Definition at line 413 of file Ramachandran.hh.
Referenced by eval_rama_score_residue(), and read_rama().
|
staticprivate |
Definition at line 419 of file Ramachandran.hh.
|
staticprivate |
Definition at line 418 of file Ramachandran.hh.
Referenced by init_rama_sampling_table(), init_uniform_sampling_table(), minimum_sampling_probability(), and phipsi_in_allowed_rama().