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) | |
~Ramachandran () override | |
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, bool const force_mirroring=false) const |
void | eval_rama_score_residue (conformation::Residue const &res, Real &rama, Real &drama_dphi, Real &drama_dpsi, bool const force_mirroring=false) const |
void | eval_rama_score_residue (AA const res_aa, Real const phi, Real const psi, Real &rama, Real &drama_dphi, Real &drama_dpsi, bool const force_mirroring=false) 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, bool const force_mirroring=false) 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, bool const force_mirroring=false) 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... | |
bool | defines_score_for_residue (conformation::Residue const &rsd) const |
Function to report whether the Ramachandran class will assign a non-zero score for this residue. 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) const |
Pick a random phi, psi value from a custom Rama table. More... | |
bool | use_rama_power () const |
Get whether we're using the rama_power option, which scales rama values over 0. More... | |
void | set_use_rama_power (bool const setting) |
Set whether we're using the rama_power option, which scales rama values over 0. More... | |
core::Real const & | rama_power () const |
Get rama_power value. More... | |
void | set_rama_power (core::Real const &setting) |
Set rama_power value. 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) const |
Load a custom Ramachandran table, in addition to the 20x3 standard ones that are always loaded. More... | |
void | symmetrize_gly_table (bool const dont_use_shap) |
If the -symmetric_gly_tables option is used, symmetrize the aa_gly table. More... | |
void | read_rama_map_file (std::istream &iunit) |
void | read_rama_map_file_shapovalov (std::istream &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) const |
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_ |
bool | use_rama_power_ |
Are we using the rama_power option? More... | |
core::Real | rama_power_ |
User-specified rama_power value. More... | |
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 |
core::scoring::Ramachandran::Ramachandran | ( | ) |
core::scoring::Ramachandran::Ramachandran | ( | std::string const & | rama_map_filename, |
bool | use_bicubic_interpolation | ||
) |
References read_rama(), set_rama_power(), and set_use_rama_power().
|
overridedefault |
utility::vector1< Real > const & core::scoring::Ramachandran::cdf_for_aa | ( | core::chemical::AA | aa | ) | const |
References protocols::cluster::calibur::aa, and 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 protocols::cluster::calibur::aa, and cdf_by_torsion_bin_.
|
inlineprivate |
Get a custom (extra) cumulative distribution function (CDF).
This function is const. The CDF must already have been generated.
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).
References extra_ram_probabil_, has_custom_rama_probability_table(), n_phi_, and n_psi_.
Referenced by generate_custom_rama_cdf().
bool core::scoring::Ramachandran::defines_score_for_residue | ( | conformation::Residue const & | rsd | ) | const |
Function to report whether the Ramachandran class will assign a non-zero score for this residue.
References core::conformation::Residue::has_lower_connect(), core::conformation::Residue::has_upper_connect(), core::chemical::ResidueTypeBase::has_variant_type(), core::conformation::Residue::is_terminus(), core::conformation::Residue::is_virtual_residue(), core::chemical::ResidueType::lower_connect_id(), core::chemical::LOWER_TERMINUS_VARIANT, core::scoring::polymeric_termini_incomplete(), core::conformation::Residue::residue_connection_partner(), core::conformation::Residue::type(), core::chemical::ResidueType::upper_connect_id(), and core::chemical::UPPER_TERMINUS_VARIANT.
Referenced by core::energy_methods::RamachandranEnergy::atoms_with_dof_derivatives(), and eval_rama_score_residue().
|
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.
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 | ||
) | const |
Pick a random phi, psi value from a custom Rama table.
The custom Rama table is lazily loaded, so the custom tables must be mutable data. 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. |
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().
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
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::Energies::onebody_energies(), core::scoring::rama, core::pose::Pose::residue(), and core::pose::Pose::size().
Real core::scoring::Ramachandran::eval_rama_score_residue | ( | AA const | res_aa, |
Real const | phi, | ||
Real const | psi, | ||
bool const | force_mirroring = false |
||
) | const |
References eval_rama_score_residue(), and core::scoring::rama.
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, | ||
bool const | force_mirroring = false |
||
) | const |
References eval_rama_score_residue(), and core::scoring::rama.
Real core::scoring::Ramachandran::eval_rama_score_residue | ( | conformation::Residue const & | res | ) | const |
References core::scoring::rama.
Referenced by core::energy_methods::RamachandranEnergy::eval_dof_derivative(), eval_rama_score_all(), eval_rama_score_residue(), eval_rama_score_residue_nonstandard_connection(), core::energy_methods::RamachandranEnergy::eval_residue_dof_derivative(), protocols::stepwise::modeler::protein::StepWiseProteinBackboneSampler::rama_energy(), and core::energy_methods::RamachandranEnergy::residue_energy().
void core::scoring::Ramachandran::eval_rama_score_residue | ( | conformation::Residue const & | res, |
Real & | rama, | ||
Real & | drama_dphi, | ||
Real & | drama_dpsi, | ||
bool const | force_mirroring = false |
||
) | const |
References core::conformation::Residue::aa(), core::chemical::aa_unk, core::conformation::Residue::backbone_aa(), defines_score_for_residue(), eval_rama_score_residue(), is_normally_connected(), core::conformation::Residue::is_protein(), core::conformation::Residue::mainchain_torsion(), and core::scoring::rama.
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, | ||
bool const | force_mirroring = false |
||
) | 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-).
References core::conformation::Residue::aa(), core::chemical::aa_unk, core::conformation::Residue::backbone_aa(), eval_rama_score_residue(), core::chemical::ResidueTypeBase::has_variant_type(), core::conformation::Residue::is_terminus(), core::chemical::LOWER_TERMINUS_VARIANT, core::scoring::polymeric_termini_incomplete(), core::scoring::rama, core::pose::Pose::residue(), core::conformation::Residue::residue_connect_atom_index(), core::conformation::Residue::residue_connection_conn_id(), core::conformation::Residue::residue_connection_partner(), core::conformation::Residue::type(), core::chemical::UPPER_TERMINUS_VARIANT, and core::conformation::Residue::xyz().
Referenced by core::energy_methods::RamachandranEnergy::eval_dof_derivative(), eval_rama_score_all(), core::energy_methods::RamachandranEnergy::eval_residue_dof_derivative(), and core::energy_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.
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(), and Ramachandran().
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.
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, core::scoring::flat_symm_pro_ramatable_stringent, and protocols::hybridization::score.
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 |
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.
References core::chemical::aa_gly, and 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.
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 get_ramatable_type_by_name(), and load_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().
References core::scoring::end_of_ramatable_type_list, get_ramatable_name_by_type(), and core::scoring::unknown_ramatable_type.
|
inlineprivate |
Has a particular custom Rama cumulative distribution function been generated?
Custom Rama tables are lazily loaded, and cumulative distribution functions are lazily generated.
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.
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.
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.
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 |
|
private |
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 |
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.
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.
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::energy_methods::RamachandranEnergy::eval_dof_derivative(), eval_rama_score_all(), eval_rama_score_residue(), core::energy_methods::RamachandranEnergy::eval_residue_dof_derivative(), and core::energy_methods::RamachandranEnergy::residue_energy().
|
private |
Load a custom Ramachandran table, in addition to the 20x3 standard ones that are always loaded.
Intended for sampling with alternative Ramachandran distributions. Custom tables are lazily loaded so as not to add to total Rosetta memory footprint.
References protocols::buns::energy, 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 |
References rama_sampling_thold_.
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 protocols::cluster::calibur::aa, 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.
References protocols::cluster::calibur::aa, and phipsi_in_allowed_rama().
|
inline |
Get rama_power value.
If used, rama values over 0 are raised to the Nth power. Unused by default.
References rama_power_.
Referenced by eval_rama_score_residue().
Real core::scoring::Ramachandran::rama_probability | ( | core::chemical::AA | aa, |
Real | phi, | ||
Real | psi | ||
) | const |
References protocols::cluster::calibur::aa, binw_, and ram_probabil_.
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).
References cdf_, draw_random_phi_psi_from_cdf(), get_l_equivalent(), and is_canonical_d_aminoacid().
Referenced by protocols::loops::loop_closure::kinematic_closure::TorsionSamplingKinematicPerturber::perturb_chain().
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
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 |
|
private |
References core::energy_methods::eval(), protocols::mean_field::max(), protocols::mean_field::min(), n_aa_, ram_counts_, ram_energ_, ram_entropy_, and ram_probabil_.
Referenced by read_rama().
|
private |
References protocols::cluster::calibur::aa, core::chemical::aa_from_name(), protocols::mean_field::max(), protocols::mean_field::min(), ram_energ_, ram_entropy_, ram_probabil_, and core::scoring::TR().
Referenced by read_rama().
|
inline |
Set rama_power value.
If used, rama values over 0 are raised to the Nth power. Unused by default.
References rama_power_.
Referenced by Ramachandran().
|
inline |
Set whether we're using the rama_power option, which scales rama values over 0.
References use_rama_power_.
Referenced by Ramachandran().
|
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).
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.
References binw_, n_psi_, and phi_psi_bins_above_thold_.
|
inline |
Get whether we're using the rama_power option, which scales rama values over 0.
References use_rama_power_.
Referenced by eval_rama_score_residue().
void core::scoring::Ramachandran::write_rama_score_all | ( | Pose const & | pose | ) | const |
|
staticprivate |
|
private |
The cumulative distribution functions (CDF) for all phi/psi bins for each amino acid.
Referenced by cdf_for_aa(), init_rama_sampling_table(), and random_phipsi_from_rama().
|
private |
|
mutableprivate |
Additional cumulative distribution functions (CDFs).
Used for several things. For example, for storing CDFs for flat L-alpha amino acid sampling.
Referenced by custom_rama_cdf(), generate_custom_rama_cdf(), and has_custom_rama_cdf().
|
mutableprivate |
Extra Ramachandran count tables.
This is a map of (energy table type -> 2D array of counts by phi, psi).
Referenced by has_custom_rama_count_table(), and load_custom_rama_table().
|
mutableprivate |
Extra Ramachandran energy tables.
This is a map of (energy table type -> 2D array of energies by phi, psi).
Referenced by has_custom_rama_energy_table(), and load_custom_rama_table().
|
mutableprivate |
Extra Ramachandran count tables.
This is a map of (energy table type -> 2D array of probabilities by phi, psi).
Referenced by custom_rama_probability_table(), has_custom_rama_probability_table(), and load_custom_rama_table().
|
staticprivate |
Referenced by init_rama_sampling_table(), init_uniform_sampling_table(), and read_rama_map_file().
|
staticprivate |
|
staticprivate |
|
private |
Referenced by init_rama_sampling_table().
|
private |
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.
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.
Referenced by read_rama_map_file(), read_rama_map_file_shapovalov(), and symmetrize_gly_table().
|
private |
|
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.
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 |
Referenced by eval_rama_score_residue(), and read_rama().
|
private |
User-specified rama_power value.
Unused by default.
Referenced by rama_power(), and set_rama_power().
|
staticprivate |
|
staticprivate |
|
private |
Are we using the rama_power option?
Defaults to false.
Referenced by set_use_rama_power(), and use_rama_power().