![]() |
Rosetta
2021.16
|
#include <BinTransitionData.hh>

Public Member Functions | |
| BinTransitionData () | |
| Default constructor for BinTransitionData. More... | |
| BinTransitionData (BinTransitionData const &src) | |
| Copy constructor for BinTransitionData. More... | |
| ~BinTransitionData () override | |
| Default destructor for BinTransitionData. More... | |
| BinTransitionDataOP | clone () const |
| Clone operation for BinTransitionData. More... | |
| void | trim_subbin_edges_and_rescale_subbin (core::Real &curbin_cdf_val, std::pair< core::Real, core::Real > &tors_range, core::Real const &phimin, core::Real const &phimax) const |
| Ensure that a sub-bin doesn't exceed the bounds of a bin. If it does, scale its back, and reduce its contribution to the cumulative distribution function proportionately. More... | |
| std::string | get_subbin_type_name (BTSB_SUBBIN_TYPE const type) const |
| Given a sub-bin type enum, return its name as it would appear in a residue params file. More... | |
| BTSB_SUBBIN_TYPE | get_subbin_type_from_name (std::string const &name) const |
| Given a sub-bin type name, return the sub-bin type enum value. More... | |
| std::string | get_property_effect_name (BT_PROPERTIES const property) const |
| Given a property enum value, return the property name as it would appear in a residue params file. More... | |
| BT_PROPERTIES | get_property_from_name (std::string const &name) const |
| Given a property name, return the property enum value. More... | |
| bool | has_property (BT_PROPERTIES const property, core::conformation::Residue const &rsd) const |
| Given a property, check whether a residue has that property. More... | |
| bool | criteria_match_i (core::conformation::Residue const &rsd) const |
| Given a residue, check whether its properties match the required and prohibited properties lists for residue i, and whether its name matches the required and prohibited names list for residue i. More... | |
| bool | criteria_match_iplus1 (core::conformation::Residue const &rsd) const |
| Given a residue, check whether its properties match the required and prohibited properties lists for residue i+1, and whether its name matches the required and prohibited names list for residue i+1. More... | |
| core::Size | random_bin_i () const |
| Select a random bin from the bins allowed for residue i, biased by the relative counts for that bin. More... | |
| core::Size | random_bin_iplus1 () const |
| Select a random bin from the bins allowed for residue i+1, biased by the relative counts for that bin. More... | |
| core::Size | random_bin_iplus1_given_i (core::Size const bin_i) const |
| Select a random bin from the bins allowed for residue i+1, biased by the relative counts for that bin given that residue i is in a particular bin. More... | |
| core::Size | which_bin_i (utility::vector1< core::Real > const &mainchain_torsions) const |
| Given a vector of mainchain torsions for a particular residue (at position i), figure out which bin the torsions lie in. More... | |
| core::Size | which_bin_iplus1 (utility::vector1< core::Real > const &mainchain_torsions) const |
| Given a vector of mainchain torsions for a particular residue (at position i+1), figure out which bin the torsions lie in. More... | |
| bool | in_bin_i (core::Size const bin_index, core::conformation::Residue const &rsd) const |
| Is a given residue within the bounds of a given bin? More... | |
| bool | in_bin_iplus1 (core::Size const bin_index, core::conformation::Residue const &rsd) const |
| Is a given residue within the bounds of a given bin? More... | |
| void | finalize () |
| Do final post-load calculations (e.g. precomputing the sum of the transition probability matrix entries, the sum of the columns, the sum of the rows, etc.) More... | |
| std::string | summarize_data (bool const verbose) const |
| Writes a report summarizing the data stored in this BinTransitionData object. More... | |
| void | check_property_overlap () const |
| Checks through the required and prohibited properties lists, and asserts that there is no overlap. More... | |
| void | check_residentity_overlap () const |
| Checks through the required and prohibited residue identities lists, and asserts that there is no overlap. More... | |
| bool | bin_exists (std::string const &name) const |
| Does a bin with the specified name exist? More... | |
| bool | bin_exists_i (std::string const &name) const |
| Does a bin with the specified name exist, defined for the ith residue? More... | |
| bool | bin_exists_iplus1 (std::string const &name) const |
| Does a bin with the specified name exist, defined for the i+1st residue? More... | |
| bool | matrix_initialized () const |
| Have the n_bins_i_ and n_bins_iplus1_ variables been set, so that the transition probability matrix could be initialized? More... | |
| bool | matrix_finalized () const |
| Have final calculations been done after initializing the probability matrix? More... | |
| core::Size | binname_index_from_string_i (std::string const &bin_name) const |
| Given a bin name, get the bin index. More... | |
| core::Size | binname_index_from_string_iplus1 (std::string const &bin_name) const |
| Given a bin name, get the bin index. More... | |
| core::Size | n_bins_i () const |
| Get the number of bins for the ith residue. More... | |
| core::Size | n_bins_iplus1 () const |
| Get the number of bins for the i+1st residue. More... | |
| core::Size | n_mainchain_torsions_i () const |
| Get the number of mainchain torsions for the ith residue. More... | |
| core::Size | n_mainchain_torsions_iplus1 () const |
| Get the number of mainchain torsions for the i+1st residue. More... | |
| std::pair< core::Real, core::Real > | bin_boundaries_i (core::Size const n, core::Size const m) const |
| Get the bin start and end boundaries, in degrees, for the nth bin and the mth mainchain torsion for residue i. More... | |
| std::pair< core::Real, core::Real > | bin_boundaries_iplus1 (core::Size const n, core::Size const m) const |
| Get the bin start and end boundaries, in degrees, for the nth bin and the mth mainchain torsion for residue i+1. More... | |
| core::Real | probability_matrix (core::Size const n, core::Size const m) const |
| Get an entry in the transition probability matrix. More... | |
| BTSB_SUBBIN_TYPE | subbin_type_i () const |
| Get the sub-bin type enum for residue i. More... | |
| BTSB_SUBBIN_TYPE | subbin_type_iplus1 () const |
| Get the sub-bin type enum for residue i+1. More... | |
| utility::vector1< core::Real > const & | subbin_cdf_i (core::Size const n) const |
| Get the sub-bin cumulative distribution function for bin n for the ith residue. More... | |
| utility::vector1< core::Real > const & | subbin_cdf_iplus1 (core::Size const n) const |
| Get the sub-bin cumulative distribution function for bin n for the i+1st residue. More... | |
| core::Real | subbin_start_i (core::Size const bin_i, core::Size const subbin_j, core::Size const mainchain_torsion_k) const |
| Get the start of the sub-bin torsion range for the ith bin, the jth sub-bin, and the kth mainchain torsion. More... | |
| core::Real | subbin_end_i (core::Size const bin_i, core::Size const subbin_j, core::Size const mainchain_torsion_k) const |
| Get the end of the sub-bin torsion range for the ith bin, the jth sub-bin, and the kth mainchain torsion. More... | |
| core::Real | subbin_start_iplus1 (core::Size const bin_i, core::Size const subbin_j, core::Size const mainchain_torsion_k) const |
| Get the start of the sub-bin torsion range for the ith bin, the jth sub-bin, and the kth mainchain torsion. More... | |
| core::Real | subbin_end_iplus1 (core::Size const bin_i, core::Size const subbin_j, core::Size const mainchain_torsion_k) const |
| Get the end of the sub-bin torsion range for the ith bin, the jth sub-bin, and the kth mainchain torsion. More... | |
| core::Real | binsums_i (core::Size const bin_index_i) const |
| Get the sum of a row of the probability matrix. More... | |
| core::Real | binsums_iplus1 (core::Size const bin_index_iplus1) const |
| Get the sum of a column of the probability matrix. More... | |
| void | set_n_mainchain_torsions_i (core::Size const val) |
| Set the number of mainchain torsions for residue i. More... | |
| void | set_n_mainchain_torsions_iplus1 (core::Size const val) |
| Set the number of mainchain torsions for residue i+1. More... | |
| void | set_n_bins (core::Size const n_bins_i, core::Size const n_bins_iplus1) |
| Set the number of bins for the ith and i+1st residues. More... | |
| void | set_binname_i (core::Size const bin, std::string const name) |
| Set the name of bin n for residue i. More... | |
| void | set_binname_iplus1 (core::Size const bin, std::string const name) |
| Set the name of bin n for residue i+1. More... | |
| void | set_binrange_i (core::Size const bin, core::Size const torsion, core::Real const &start, core::Real const &end) |
| Set the torsion ranges for bin n, mainchain torsion m of residue i. More... | |
| void | set_binrange_iplus1 (core::Size const bin, core::Size const torsion, core::Real const &start, core::Real const &end) |
| Set the torsion ranges for bin n, mainchain torsion m of residue i+1. More... | |
| void | copy_i_bins_to_iplus1 () |
| Copy the bin names and torsion ranges for residue i to those for residue i+1. More... | |
| void | set_matrix_entry (core::Size const n, core::Size const m, core::Real const &val) |
| Set a value in the transition probability matrix. More... | |
| void | add_property_i (std::string const &property) |
| Add a property to the list of properties that the ith residue MUST have. More... | |
| void | prohibit_property_i (std::string const &property) |
| Add a property to the list of properties that the ith residue MUST NOT have. More... | |
| void | add_property_iplus1 (std::string const &property) |
| Add a property to the list of properties that the i+1st residue MUST have. More... | |
| void | prohibit_property_iplus1 (std::string const &property) |
| Add a property to the list of properties that the i+1st residue MUST NOT have. More... | |
| void | add_res_identity_i (std::string const &resname) |
| Add a residue identity to the list of residue identities that the ith residue MUST have. More... | |
| void | prohibit_res_identity_i (std::string const &resname) |
| Add a residue identity to the list of residue identities that the ith residue MUST NOT have. More... | |
| void | add_res_identity_iplus1 (std::string const &resname) |
| Add a residue identity to the list of residue identities that the i+1st residue MUST have. More... | |
| void | prohibit_res_identity_iplus1 (std::string const &resname) |
| Add a residue identity to the list of residue identities that the i+1st residue MUST NOT have. More... | |
| void | set_subbin_type_i (std::string const &type) |
| Set the sub-bin type for residue i. More... | |
| void | set_subbin_type_iplus1 (std::string const &type) |
| Set the sub-bin type for residue i+1. More... | |
Private Member Functions | |
| bool | in_bin (core::Real const &min, core::Real const &max, core::Real const &val) const |
| Am I within the bounds of a 1D bin? More... | |
| core::Real | set_in_range (core::Real const &angle) const |
| Adjust an angle to lie in the range (-180,180). More... | |
| bool | is_in_list (BT_PROPERTIES const val, utility::vector1< BT_PROPERTIES > const &list) const |
| Check whether a value is in a list. More... | |
| bool | is_in_list (std::string const &str, utility::vector1< std::string > const &list) const |
| Check whether a string is in a list. More... | |
| void | set_up_subbins () |
| Set up the sub-bins and their cumulative probability distributions (if appropriate). More... | |
| void | set_up_bin_cdfs () |
| Set up the cumulative probability distributions for each bin at position i+1 given a bin at position i, and vice versa. More... | |
Private Attributes | |
| core::Size | n_mainchain_torsions_i_ |
| Number of mainchain torsions in the ith residue. More... | |
| core::Size | n_mainchain_torsions_iplus1_ |
| Number of mainchain torsions in the i+1st residue. More... | |
| core::Size | n_bins_i_ |
| Number of bins for the ith residue. More... | |
| utility::vector1 < utility::vector1< std::pair < core::Real, core::Real > > > | binranges_i_ |
| Torsion ranges for each bin for the ith residue. More... | |
| utility::vector1< std::string > | binnames_i_ |
| Bin names for the ith residue. More... | |
| core::Size | n_bins_iplus1_ |
| Number of bins for the i+1st residue. More... | |
| utility::vector1 < utility::vector1< std::pair < core::Real, core::Real > > > | binranges_iplus1_ |
| Torsion ranges for each bin for the i+1st residue. More... | |
| utility::vector1< std::string > | binnames_iplus1_ |
| Bin names for the i + 1st residue. More... | |
| bool | matrix_initialized_ |
| Have the n_bins_i_ and n_bins_iplus1_ variables been set, so that the transition probability matrix could be initialized? More... | |
| bool | matrix_finalized_ |
| Have final calculations (e.g. normalization factor, column and row sums) been done after loading the transition probability matrix? More... | |
| utility::vector1 < utility::vector1< core::Real > > | probability_matrix_ |
| The matrix of probability values. More... | |
| utility::vector1< BT_PROPERTIES > | properties_i_ |
| List of properties that the ith residue MUST have. More... | |
| utility::vector1< BT_PROPERTIES > | prohibited_properties_i_ |
| List of properties that the ith residue MUST NOT have. More... | |
| utility::vector1< BT_PROPERTIES > | properties_iplus1_ |
| List of properties that the i+1st residue MUST have. More... | |
| utility::vector1< BT_PROPERTIES > | prohibited_properties_iplus1_ |
| List of properties that the i+1st residue MUST NOT have. More... | |
| utility::vector1< std::string > | res_identities_i_ |
| List of residue identities that the ith residue MUST have. More... | |
| utility::vector1< std::string > | prohibited_res_identities_i_ |
| List of residue identities that the ith residue MUST NOT have. More... | |
| utility::vector1< std::string > | res_identities_iplus1_ |
| List of residue identities that hte i+1st residue MUST have. More... | |
| utility::vector1< std::string > | prohibited_res_identities_iplus1_ |
| List of residue identities that hte i+1st residue MUST NOT have. More... | |
| utility::vector1< core::Real > | binsums_i_ |
| Sum of counts for the ith residue bins (across all i+1st residue bins). More... | |
| utility::vector1< core::Real > | binsums_iplus1_ |
| Sum of counts for the i+1st residue bins (across all ith residue bins). More... | |
| core::Real | total_counts_ |
| Sum of all entries in the probability matrix. More... | |
| utility::vector1< core::Real > | binsums_i_cdf_ |
| Cumulative probability distribution for the ith residue bins. More... | |
| utility::vector1< core::Real > | binsums_iplus1_cdf_ |
| Cumulative probability distribution for the i+1st residue bins. More... | |
| BTSB_SUBBIN_TYPE | subbin_type_i_ |
| The type of sub-bins for residue i. More... | |
| BTSB_SUBBIN_TYPE | subbin_type_iplus1_ |
| The type of sub-bins for residue i+1. More... | |
| utility::vector1 < utility::vector1< core::Real > | subbin_cdf_i_ |
| Cumulative probability distribution for the ith residue's bins, WITHIN each bin. (For example, based on ramachandran probabilities within each ABEGO bin). More... | |
| utility::vector1 < utility::vector1 < utility::vector1< std::pair < core::Real, core::Real >>> | subbin_ranges_i_ |
| The sub-bin identities for the ith residue's bins. More... | |
| utility::vector1 < utility::vector1< core::Real > | subbin_cdf_iplus1_ |
| Cumulative probability distribution for the i+1st residue's bins, WITHIN each bin. (For example, based on ramachandran probabilities within each ABEGO bin). More... | |
| utility::vector1 < utility::vector1 < utility::vector1< std::pair < core::Real, core::Real >>> | subbin_ranges_iplus1_ |
| The sub-bin identities for the i+1st residue's bins. More... | |
| utility::vector1 < utility::vector1< core::Real > | bin_iplus1_cdf_given_i_ |
| Pre-calculated cumulative distribution functions for the probability of a bin at position i+1 (inner vector) given particular bins at position i (outer vector). More... | |
| utility::vector1 < utility::vector1< core::Real > | bin_i_cdf_given_iplus1_ |
| Pre-calculated cumulative distribution functions for the probability of a bin at position i (inner vector) given particular bins at position i+1 (outer vector). More... | |
| core::scoring::bin_transitions::BinTransitionData::BinTransitionData | ( | ) |
Default constructor for BinTransitionData.
| core::scoring::bin_transitions::BinTransitionData::BinTransitionData | ( | BinTransitionData const & | src | ) |
Copy constructor for BinTransitionData.
|
overridedefault |
Default destructor for BinTransitionData.
|
inline |
Add a property to the list of properties that the ith residue MUST have.
References core::scoring::bin_transitions::BT_UNKNOWN_PROPERTY, get_property_from_name(), is_in_list(), and properties_i_.
|
inline |
Add a property to the list of properties that the i+1st residue MUST have.
References core::scoring::bin_transitions::BT_UNKNOWN_PROPERTY, get_property_from_name(), is_in_list(), and properties_iplus1_.
|
inline |
Add a residue identity to the list of residue identities that the ith residue MUST have.
If the list is left empty, the residue identities can be anything. Residue names are provided as three-letter codes.
References is_in_list(), and res_identities_i_.
|
inline |
Add a residue identity to the list of residue identities that the i+1st residue MUST have.
If the list is left empty, the residue identities can be anything. Residue names are provided as three-letter codes.
References is_in_list(), and res_identities_iplus1_.
|
inline |
Get the bin start and end boundaries, in degrees, for the nth bin and the mth mainchain torsion for residue i.
If the end is less than the start, it means that the bin runs through 180 degrees and wraps around.
References binranges_i_.
Referenced by summarize_data().
|
inline |
Get the bin start and end boundaries, in degrees, for the nth bin and the mth mainchain torsion for residue i+1.
If the end is less than the start, it means that the bin runs through 180 degrees and wraps around.
References binranges_iplus1_.
Referenced by summarize_data().
| bool core::scoring::bin_transitions::BinTransitionData::bin_exists | ( | std::string const & | name | ) | const |
Does a bin with the specified name exist?
References bin_exists_i(), and bin_exists_iplus1().
| bool core::scoring::bin_transitions::BinTransitionData::bin_exists_i | ( | std::string const & | name | ) | const |
Does a bin with the specified name exist, defined for the ith residue?
References binnames_i_, and is_in_list().
Referenced by bin_exists().
| bool core::scoring::bin_transitions::BinTransitionData::bin_exists_iplus1 | ( | std::string const & | name | ) | const |
Does a bin with the specified name exist, defined for the i+1st residue?
References binnames_iplus1_, and is_in_list().
Referenced by bin_exists().
|
inline |
Given a bin name, get the bin index.
Returns 0 if the name is not found. Checks the list of bin names for the ith residue.
References binnames_i_.
|
inline |
Given a bin name, get the bin index.
Returns 0 if the name is not found. Checks the list of bin names for the i+1st residue.
References binnames_iplus1_.
|
inline |
Get the sum of a row of the probability matrix.
This is the sum of all counts(bin_i, bin_iplus1), summed across all bin_iplus1. This is pre-calculated and stored, so this is a fast lookup.
References binsums_i_.
|
inline |
Get the sum of a column of the probability matrix.
This is the sum of all counts(bin_i, bin_iplus1), summed across all bin_i. This is pre-calculated and stored, so this is a fast lookup.
References binsums_iplus1_.
|
inline |
Checks through the required and prohibited properties lists, and asserts that there is no overlap.
Throws an error if there is overlap.
References prohibited_properties_i_, prohibited_properties_iplus1_, properties_i_, and properties_iplus1_.
|
inline |
Checks through the required and prohibited residue identities lists, and asserts that there is no overlap.
Throws an error if there is overlap.
References prohibited_res_identities_i_, prohibited_res_identities_iplus1_, res_identities_i_, and res_identities_iplus1_.
| BinTransitionDataOP core::scoring::bin_transitions::BinTransitionData::clone | ( | ) | const |
Clone operation for BinTransitionData.
Returns an owning pointer to a copy of this object.
|
inline |
Copy the bin names and torsion ranges for residue i to those for residue i+1.
References binnames_i_, binnames_iplus1_, binranges_i_, binranges_iplus1_, n_bins_i(), n_bins_iplus1(), n_mainchain_torsions_i(), n_mainchain_torsions_iplus1(), subbin_cdf_i_, subbin_cdf_iplus1_, subbin_ranges_i_, subbin_ranges_iplus1_, subbin_type_i_, and subbin_type_iplus1_.
| bool core::scoring::bin_transitions::BinTransitionData::criteria_match_i | ( | core::conformation::Residue const & | rsd | ) | const |
Given a residue, check whether its properties match the required and prohibited properties lists for residue i, and whether its name matches the required and prohibited names list for residue i.
References has_property(), matrix_finalized(), matrix_initialized(), core::conformation::Residue::name3(), prohibited_properties_i_, prohibited_res_identities_i_, properties_i_, and res_identities_i_.
| bool core::scoring::bin_transitions::BinTransitionData::criteria_match_iplus1 | ( | core::conformation::Residue const & | rsd | ) | const |
Given a residue, check whether its properties match the required and prohibited properties lists for residue i+1, and whether its name matches the required and prohibited names list for residue i+1.
References has_property(), matrix_finalized(), matrix_initialized(), core::conformation::Residue::name3(), prohibited_properties_iplus1_, prohibited_res_identities_iplus1_, properties_iplus1_, and res_identities_iplus1_.
| void core::scoring::bin_transitions::BinTransitionData::finalize | ( | ) |
Do final post-load calculations (e.g. precomputing the sum of the transition probability matrix entries, the sum of the columns, the sum of the rows, etc.)
References binsums_i_, binsums_i_cdf_, binsums_iplus1_, binsums_iplus1_cdf_, matrix_finalized(), matrix_finalized_, matrix_initialized(), n_bins_i(), n_bins_iplus1(), probability_matrix(), set_up_bin_cdfs(), set_up_subbins(), and total_counts_.
| std::string core::scoring::bin_transitions::BinTransitionData::get_property_effect_name | ( | BT_PROPERTIES const | property | ) | const |
Given a property enum value, return the property name as it would appear in a residue params file.
References core::scoring::bin_transitions::BT_ALPHA_AA, core::scoring::bin_transitions::BT_AROMATIC, core::scoring::bin_transitions::BT_BETA_AA, core::scoring::bin_transitions::BT_CHARGED, core::scoring::bin_transitions::BT_CYCLIC, core::scoring::bin_transitions::BT_D_AA, core::scoring::bin_transitions::BT_DISULFIDE_BONDED, core::scoring::bin_transitions::BT_L_AA, core::scoring::bin_transitions::BT_METALBINDING, core::scoring::bin_transitions::BT_POLAR, core::scoring::bin_transitions::BT_PROTEIN, and core::scoring::bin_transitions::BT_SIDECHAIN_THIOL.
Referenced by get_property_from_name(), and summarize_data().
| BT_PROPERTIES core::scoring::bin_transitions::BinTransitionData::get_property_from_name | ( | std::string const & | name | ) | const |
Given a property name, return the property enum value.
Returns BT_UNKNOWN_PROPERTY if not identifiable.
References core::scoring::bin_transitions::BT_UNKNOWN_PROPERTY, and get_property_effect_name().
Referenced by add_property_i(), add_property_iplus1(), prohibit_property_i(), and prohibit_property_iplus1().
| BTSB_SUBBIN_TYPE core::scoring::bin_transitions::BinTransitionData::get_subbin_type_from_name | ( | std::string const & | name | ) | const |
Given a sub-bin type name, return the sub-bin type enum value.
Returns BTSB_UNKNOWN if not identifiable.
References core::scoring::bin_transitions::BTSB_UNKNOWN, and get_subbin_type_name().
Referenced by set_subbin_type_i(), and set_subbin_type_iplus1().
| std::string core::scoring::bin_transitions::BinTransitionData::get_subbin_type_name | ( | BTSB_SUBBIN_TYPE const | type | ) | const |
Given a sub-bin type enum, return its name as it would appear in a residue params file.
References core::scoring::bin_transitions::BTSB_D_AA, core::scoring::bin_transitions::BTSB_D_PRO, core::scoring::bin_transitions::BTSB_GLY, core::scoring::bin_transitions::BTSB_L_AA, core::scoring::bin_transitions::BTSB_L_PRO, and core::scoring::bin_transitions::BTSB_NONE.
Referenced by get_subbin_type_from_name(), set_up_subbins(), and summarize_data().
| bool core::scoring::bin_transitions::BinTransitionData::has_property | ( | BT_PROPERTIES const | property, |
| core::conformation::Residue const & | rsd | ||
| ) | const |
Given a property, check whether a residue has that property.
This function provides the link to the suitable property lookup function in ResidueType.
References core::scoring::bin_transitions::BT_ALPHA_AA, core::scoring::bin_transitions::BT_AROMATIC, core::scoring::bin_transitions::BT_BETA_AA, core::scoring::bin_transitions::BT_CHARGED, core::scoring::bin_transitions::BT_CYCLIC, core::scoring::bin_transitions::BT_D_AA, core::scoring::bin_transitions::BT_DISULFIDE_BONDED, core::scoring::bin_transitions::BT_L_AA, core::scoring::bin_transitions::BT_METALBINDING, core::scoring::bin_transitions::BT_POLAR, core::scoring::bin_transitions::BT_PROTEIN, core::scoring::bin_transitions::BT_SIDECHAIN_THIOL, core::chemical::ResidueType::is_alpha_aa(), core::chemical::ResidueType::is_aromatic(), core::chemical::ResidueType::is_beta_aa(), core::chemical::ResidueType::is_charged(), core::chemical::ResidueType::is_cyclic(), core::chemical::ResidueTypeBase::is_d_aa(), core::chemical::ResidueType::is_disulfide_bonded(), core::chemical::ResidueTypeBase::is_l_aa(), core::chemical::ResidueType::is_metalbinding(), core::chemical::ResidueType::is_polar(), core::chemical::ResidueTypeBase::is_protein(), core::chemical::ResidueType::is_sidechain_thiol(), and core::conformation::Residue::type().
Referenced by criteria_match_i(), and criteria_match_iplus1().
|
inlineprivate |
Am I within the bounds of a 1D bin?
If min > max, I want to be OUTSIDE of the range [min, max].
Referenced by set_up_subbins(), which_bin_i(), and which_bin_iplus1().
| bool core::scoring::bin_transitions::BinTransitionData::in_bin_i | ( | core::Size const | bin_index, |
| core::conformation::Residue const & | rsd | ||
| ) | const |
Is a given residue within the bounds of a given bin?
Uses bin definitions for the ith residue.
References core::conformation::Residue::mainchain_torsions(), and which_bin_i().
| bool core::scoring::bin_transitions::BinTransitionData::in_bin_iplus1 | ( | core::Size const | bin_index, |
| core::conformation::Residue const & | rsd | ||
| ) | const |
Is a given residue within the bounds of a given bin?
Uses bin definitions for the i+1st residue.
References core::conformation::Residue::mainchain_torsions(), and which_bin_iplus1().
|
inlineprivate |
Check whether a value is in a list.
Referenced by add_property_i(), add_property_iplus1(), add_res_identity_i(), add_res_identity_iplus1(), bin_exists_i(), bin_exists_iplus1(), prohibit_property_i(), prohibit_property_iplus1(), prohibit_res_identity_i(), and prohibit_res_identity_iplus1().
|
inlineprivate |
Check whether a string is in a list.
|
inline |
Have final calculations been done after initializing the probability matrix?
References matrix_finalized_.
Referenced by criteria_match_i(), criteria_match_iplus1(), finalize(), random_bin_i(), random_bin_iplus1(), random_bin_iplus1_given_i(), set_up_bin_cdfs(), set_up_subbins(), which_bin_i(), and which_bin_iplus1().
|
inline |
Have the n_bins_i_ and n_bins_iplus1_ variables been set, so that the transition probability matrix could be initialized?
References matrix_initialized_.
Referenced by criteria_match_i(), criteria_match_iplus1(), finalize(), probability_matrix(), random_bin_i(), random_bin_iplus1(), random_bin_iplus1_given_i(), set_binname_i(), set_binname_iplus1(), set_binrange_i(), set_binrange_iplus1(), set_matrix_entry(), set_n_bins(), set_up_bin_cdfs(), set_up_subbins(), which_bin_i(), and which_bin_iplus1().
|
inline |
Get the number of bins for the ith residue.
References n_bins_i_.
Referenced by copy_i_bins_to_iplus1(), finalize(), random_bin_iplus1_given_i(), set_binname_i(), set_binrange_i(), set_n_bins(), set_up_bin_cdfs(), set_up_subbins(), subbin_end_i(), subbin_start_i(), summarize_data(), and which_bin_i().
|
inline |
Get the number of bins for the i+1st residue.
References n_bins_iplus1_.
Referenced by copy_i_bins_to_iplus1(), finalize(), set_binname_iplus1(), set_binrange_iplus1(), set_n_bins(), set_up_bin_cdfs(), set_up_subbins(), subbin_end_iplus1(), subbin_start_iplus1(), summarize_data(), and which_bin_iplus1().
|
inline |
Get the number of mainchain torsions for the ith residue.
References n_mainchain_torsions_i_.
Referenced by copy_i_bins_to_iplus1(), set_binrange_i(), set_up_subbins(), subbin_end_i(), subbin_start_i(), summarize_data(), and which_bin_i().
|
inline |
Get the number of mainchain torsions for the i+1st residue.
References n_mainchain_torsions_iplus1_.
Referenced by copy_i_bins_to_iplus1(), set_binrange_iplus1(), set_up_subbins(), subbin_end_iplus1(), subbin_start_iplus1(), summarize_data(), and which_bin_iplus1().
|
inline |
Get an entry in the transition probability matrix.
[n][m] = bin of ith residue, bin of i+1st residue.
References matrix_initialized(), and probability_matrix_.
Referenced by finalize(), and summarize_data().
|
inline |
Add a property to the list of properties that the ith residue MUST NOT have.
References core::scoring::bin_transitions::BT_UNKNOWN_PROPERTY, get_property_from_name(), is_in_list(), and prohibited_properties_i_.
|
inline |
Add a property to the list of properties that the i+1st residue MUST NOT have.
References core::scoring::bin_transitions::BT_UNKNOWN_PROPERTY, get_property_from_name(), is_in_list(), and prohibited_properties_iplus1_.
|
inline |
Add a residue identity to the list of residue identities that the ith residue MUST NOT have.
If the list is left empty, the residue identities can be anything. Residue names are provided as three-letter codes.
References is_in_list(), and prohibited_res_identities_i_.
|
inline |
Add a residue identity to the list of residue identities that the i+1st residue MUST NOT have.
If the list is left empty, the residue identities can be anything. Residue names are provided as three-letter codes.
References is_in_list(), and prohibited_res_identities_iplus1_.
| core::Size core::scoring::bin_transitions::BinTransitionData::random_bin_i | ( | ) | const |
Select a random bin from the bins allowed for residue i, biased by the relative counts for that bin.
References binsums_i_cdf_, matrix_finalized(), matrix_initialized(), and core::scoring::rg.
| core::Size core::scoring::bin_transitions::BinTransitionData::random_bin_iplus1 | ( | ) | const |
Select a random bin from the bins allowed for residue i+1, biased by the relative counts for that bin.
References binsums_iplus1_cdf_, matrix_finalized(), matrix_initialized(), and core::scoring::rg.
| core::Size core::scoring::bin_transitions::BinTransitionData::random_bin_iplus1_given_i | ( | core::Size const | bin_i | ) | const |
Select a random bin from the bins allowed for residue i+1, biased by the relative counts for that bin given that residue i is in a particular bin.
References bin_iplus1_cdf_given_i_, matrix_finalized(), matrix_initialized(), n_bins_i(), and core::scoring::rg.
|
inline |
Set the name of bin n for residue i.
This requires that the number of bins has already been set.
References binnames_i_, matrix_initialized(), and n_bins_i().
|
inline |
Set the name of bin n for residue i+1.
This requires that the number of bins has already been set.
References binnames_iplus1_, matrix_initialized(), and n_bins_iplus1().
|
inline |
Set the torsion ranges for bin n, mainchain torsion m of residue i.
This requires that the number of bins and the number of mainchain torsions have already been set.
References binranges_i_, matrix_initialized(), n_bins_i(), n_mainchain_torsions_i(), and set_in_range().
|
inline |
Set the torsion ranges for bin n, mainchain torsion m of residue i+1.
This requires that the number of bins and the number of mainchain torsions have already been set.
References binranges_iplus1_, matrix_initialized(), n_bins_iplus1(), n_mainchain_torsions_iplus1(), and set_in_range().
|
inlineprivate |
Adjust an angle to lie in the range (-180,180).
Referenced by set_binrange_i(), set_binrange_iplus1(), set_up_subbins(), which_bin_i(), and which_bin_iplus1().
|
inline |
Set a value in the transition probability matrix.
References matrix_initialized(), probability_matrix_, and protocols::hybridization::val.
| void core::scoring::bin_transitions::BinTransitionData::set_n_bins | ( | core::Size const | n_bins_i, |
| core::Size const | n_bins_iplus1 | ||
| ) |
Set the number of bins for the ith and i+1st residues.
This also initializes the probability matrix (to all zeros), the binnames vectors (to vectors of empty strings), and the binranges vectors (to all zeros).
References binnames_i_, binnames_iplus1_, binranges_i_, binranges_iplus1_, matrix_finalized_, matrix_initialized(), matrix_initialized_, n_bins_i(), n_bins_i_, n_bins_iplus1(), n_bins_iplus1_, n_mainchain_torsions_i_, n_mainchain_torsions_iplus1_, probability_matrix_, and core::scoring::bin_transitions::TR().
|
inline |
Set the number of mainchain torsions for residue i.
References n_mainchain_torsions_i_, and protocols::hybridization::val.
|
inline |
Set the number of mainchain torsions for residue i+1.
References n_mainchain_torsions_iplus1_, and protocols::hybridization::val.
|
inline |
Set the sub-bin type for residue i.
Each bin can be divided into sub-bins in one of several ways. For example, phi/psi/omega bins (like the ABEGO bins) can be divided into 5x5x90 bins corresponding to the bins used by the Rama scorefunction. This is useful for drawing random phi/psi angles from within the bin.
References core::scoring::bin_transitions::BTSB_UNKNOWN, get_subbin_type_from_name(), and subbin_type_i_.
|
inline |
Set the sub-bin type for residue i+1.
Each bin can be divided into sub-bins in one of several ways. For example, phi/psi/omega bins (like the ABEGO bins) can be divided into 5x5x90 bins corresponding to the bins used by the Rama scorefunction. This is useful for drawing random phi/psi angles from within the bin.
References core::scoring::bin_transitions::BTSB_UNKNOWN, get_subbin_type_from_name(), and subbin_type_iplus1_.
|
private |
Set up the cumulative probability distributions for each bin at position i+1 given a bin at position i, and vice versa.
References bin_i_cdf_given_iplus1_, bin_iplus1_cdf_given_i_, matrix_finalized(), matrix_initialized(), n_bins_i(), n_bins_iplus1(), and probability_matrix_.
Referenced by finalize().
|
private |
Set up the sub-bins and their cumulative probability distributions (if appropriate).
References core::chemical::aa_ala, core::chemical::aa_gly, core::chemical::aa_pro, binranges_i_, binranges_iplus1_, core::scoring::bin_transitions::BTSB_D_AA, core::scoring::bin_transitions::BTSB_D_PRO, core::scoring::bin_transitions::BTSB_GLY, core::scoring::bin_transitions::BTSB_L_AA, core::scoring::bin_transitions::BTSB_L_PRO, get_subbin_type_name(), in_bin(), matrix_finalized(), matrix_initialized(), n_bins_i(), n_bins_iplus1(), n_mainchain_torsions_i(), n_mainchain_torsions_iplus1(), core::scoring::Ramachandran::n_phi_bins(), core::scoring::pair, core::scoring::rama, core::scoring::Ramachandran::rama_probability(), set_in_range(), subbin_cdf_i_, subbin_cdf_iplus1_, subbin_ranges_i_, subbin_ranges_iplus1_, subbin_type_i(), subbin_type_iplus1(), and trim_subbin_edges_and_rescale_subbin().
Referenced by finalize().
|
inline |
Get the sub-bin cumulative distribution function for bin n for the ith residue.
Const-access only.
References subbin_cdf_i_.
|
inline |
Get the sub-bin cumulative distribution function for bin n for the i+1st residue.
Const-access only.
References subbin_cdf_iplus1_.
|
inline |
Get the end of the sub-bin torsion range for the ith bin, the jth sub-bin, and the kth mainchain torsion.
References n_bins_i(), n_mainchain_torsions_i(), and subbin_ranges_i_.
|
inline |
Get the end of the sub-bin torsion range for the ith bin, the jth sub-bin, and the kth mainchain torsion.
References n_bins_iplus1(), n_mainchain_torsions_iplus1(), and subbin_ranges_iplus1_.
|
inline |
Get the start of the sub-bin torsion range for the ith bin, the jth sub-bin, and the kth mainchain torsion.
References n_bins_i(), n_mainchain_torsions_i(), and subbin_ranges_i_.
|
inline |
Get the start of the sub-bin torsion range for the ith bin, the jth sub-bin, and the kth mainchain torsion.
References n_bins_iplus1(), n_mainchain_torsions_iplus1(), and subbin_ranges_iplus1_.
|
inline |
|
inline |
Get the sub-bin type enum for residue i+1.
References subbin_type_iplus1_.
Referenced by set_up_subbins().
| std::string core::scoring::bin_transitions::BinTransitionData::summarize_data | ( | bool const | verbose | ) | const |
Writes a report summarizing the data stored in this BinTransitionData object.
If verbose is true, the full set of sub-bins is written out, too.
References bin_boundaries_i(), bin_boundaries_iplus1(), bin_i_cdf_given_iplus1_, bin_iplus1_cdf_given_i_, binnames_i_, binnames_iplus1_, binsums_i_, binsums_i_cdf_, binsums_iplus1_, binsums_iplus1_cdf_, get_property_effect_name(), get_subbin_type_name(), n_bins_i(), n_bins_iplus1(), n_mainchain_torsions_i(), n_mainchain_torsions_iplus1(), probability_matrix(), prohibited_properties_i_, prohibited_properties_iplus1_, prohibited_res_identities_i_, prohibited_res_identities_iplus1_, properties_i_, properties_iplus1_, res_identities_i_, res_identities_iplus1_, subbin_cdf_i_, subbin_cdf_iplus1_, subbin_ranges_i_, subbin_ranges_iplus1_, subbin_type_i_, subbin_type_iplus1_, and total_counts_.
| void core::scoring::bin_transitions::BinTransitionData::trim_subbin_edges_and_rescale_subbin | ( | core::Real & | curbin_cdf_val, |
| std::pair< core::Real, core::Real > & | tors_range, | ||
| core::Real const & | phimin, | ||
| core::Real const & | phimax | ||
| ) | const |
Ensure that a sub-bin doesn't exceed the bounds of a bin. If it does, scale its back, and reduce its contribution to the cumulative distribution function proportionately.
Referenced by set_up_subbins().
| core::Size core::scoring::bin_transitions::BinTransitionData::which_bin_i | ( | utility::vector1< core::Real > const & | mainchain_torsions | ) | const |
Given a vector of mainchain torsions for a particular residue (at position i), figure out which bin the torsions lie in.
Given a vector of mainchain torsions for a particular residue, figure out which bin the torsions lie in.
References binranges_i_, in_bin(), matrix_finalized(), matrix_initialized(), n_bins_i(), n_mainchain_torsions_i(), set_in_range(), and core::scoring::bin_transitions::TR().
Referenced by in_bin_i().
| core::Size core::scoring::bin_transitions::BinTransitionData::which_bin_iplus1 | ( | utility::vector1< core::Real > const & | mainchain_torsions | ) | const |
Given a vector of mainchain torsions for a particular residue (at position i+1), figure out which bin the torsions lie in.
Given a vector of mainchain torsions for a particular residue, figure out which bin the torsions lie in.
References binranges_iplus1_, in_bin(), matrix_finalized(), matrix_initialized(), n_bins_iplus1(), n_mainchain_torsions_iplus1(), and set_in_range().
Referenced by in_bin_iplus1().
|
private |
Pre-calculated cumulative distribution functions for the probability of a bin at position i (inner vector) given particular bins at position i+1 (outer vector).
NOTE that indices are backwards to what's usual, here!
Referenced by set_up_bin_cdfs(), and summarize_data().
|
private |
Pre-calculated cumulative distribution functions for the probability of a bin at position i+1 (inner vector) given particular bins at position i (outer vector).
Referenced by random_bin_iplus1_given_i(), set_up_bin_cdfs(), and summarize_data().
|
private |
Bin names for the ith residue.
Referenced by bin_exists_i(), binname_index_from_string_i(), copy_i_bins_to_iplus1(), set_binname_i(), set_n_bins(), and summarize_data().
|
private |
Bin names for the i + 1st residue.
Referenced by bin_exists_iplus1(), binname_index_from_string_iplus1(), copy_i_bins_to_iplus1(), set_binname_iplus1(), set_n_bins(), and summarize_data().
|
private |
Torsion ranges for each bin for the ith residue.
The outer vector is the bins. The inner vector is the mainchain torsions. For each mainchain torsion, a pair is defined of (start of range, end of range). If the end of the range is smaller than the start of the range, it is understood that the bin wraps around (e.g. 90, -90 means a bin running from 90, through 180, back to -180, and to -90). Each bin INCLUDES the start of its range and EXCLUDES the end of its range (i.e. 25 35 means 25 <= angle < 35).
Referenced by bin_boundaries_i(), copy_i_bins_to_iplus1(), set_binrange_i(), set_n_bins(), set_up_subbins(), and which_bin_i().
|
private |
Torsion ranges for each bin for the i+1st residue.
The outer vector is the bins. The inner vector is the mainchain torsions. For each mainchain torsion, a pair is defined of (start of range, end of range). If the end of the range is smaller than the start of the range, it is understood that the bin wraps around (e.g. 90, -90 means a bin running from 90, through 180, back to -180, and to -90). Each bin INCLUDES the start of its range and EXCLUDES the end of its range (i.e. 25 35 means 25 <= angle < 35).
Referenced by bin_boundaries_iplus1(), copy_i_bins_to_iplus1(), set_binrange_iplus1(), set_n_bins(), set_up_subbins(), and which_bin_iplus1().
|
private |
Sum of counts for the ith residue bins (across all i+1st residue bins).
Referenced by binsums_i(), finalize(), and summarize_data().
|
private |
Cumulative probability distribution for the ith residue bins.
This ranges from 0 to 1.
Referenced by finalize(), random_bin_i(), and summarize_data().
|
private |
Sum of counts for the i+1st residue bins (across all ith residue bins).
Referenced by binsums_iplus1(), finalize(), and summarize_data().
|
private |
Cumulative probability distribution for the i+1st residue bins.
This ranges from 0 to 1.
Referenced by finalize(), random_bin_iplus1(), and summarize_data().
|
private |
Have final calculations (e.g. normalization factor, column and row sums) been done after loading the transition probability matrix?
Referenced by finalize(), matrix_finalized(), and set_n_bins().
|
private |
Have the n_bins_i_ and n_bins_iplus1_ variables been set, so that the transition probability matrix could be initialized?
Referenced by matrix_initialized(), and set_n_bins().
|
private |
Number of bins for the ith residue.
Referenced by n_bins_i(), and set_n_bins().
|
private |
Number of bins for the i+1st residue.
Referenced by n_bins_iplus1(), and set_n_bins().
|
private |
Number of mainchain torsions in the ith residue.
Referenced by n_mainchain_torsions_i(), set_n_bins(), and set_n_mainchain_torsions_i().
|
private |
Number of mainchain torsions in the i+1st residue.
Referenced by n_mainchain_torsions_iplus1(), set_n_bins(), and set_n_mainchain_torsions_iplus1().
|
private |
The matrix of probability values.
probability_matrix_[x][y] represents the probability of the ith residue being in torsion bin x and the i+1st residue being in torsion bin y. These are unnormalized probabilities.
Referenced by probability_matrix(), set_matrix_entry(), set_n_bins(), and set_up_bin_cdfs().
|
private |
List of properties that the ith residue MUST NOT have.
Referenced by check_property_overlap(), criteria_match_i(), prohibit_property_i(), and summarize_data().
|
private |
List of properties that the i+1st residue MUST NOT have.
Referenced by check_property_overlap(), criteria_match_iplus1(), prohibit_property_iplus1(), and summarize_data().
|
private |
List of residue identities that the ith residue MUST NOT have.
Vector of strings of three-letter codes.
Referenced by check_residentity_overlap(), criteria_match_i(), prohibit_res_identity_i(), and summarize_data().
|
private |
List of residue identities that hte i+1st residue MUST NOT have.
Vector of strings of three-letter codes.
Referenced by check_residentity_overlap(), criteria_match_iplus1(), prohibit_res_identity_iplus1(), and summarize_data().
|
private |
List of properties that the ith residue MUST have.
Referenced by add_property_i(), check_property_overlap(), criteria_match_i(), and summarize_data().
|
private |
List of properties that the i+1st residue MUST have.
Referenced by add_property_iplus1(), check_property_overlap(), criteria_match_iplus1(), and summarize_data().
|
private |
List of residue identities that the ith residue MUST have.
Vector of strings of three-letter codes.
Referenced by add_res_identity_i(), check_residentity_overlap(), criteria_match_i(), and summarize_data().
|
private |
List of residue identities that hte i+1st residue MUST have.
Vector of strings of three-letter codes.
Referenced by add_res_identity_iplus1(), check_residentity_overlap(), criteria_match_iplus1(), and summarize_data().
|
private |
Cumulative probability distribution for the ith residue's bins, WITHIN each bin. (For example, based on ramachandran probabilities within each ABEGO bin).
The outer vector represents the bin, and the inner vector represents the cumulative probability distribution for each sub-bin within that bin.
Referenced by copy_i_bins_to_iplus1(), set_up_subbins(), subbin_cdf_i(), and summarize_data().
|
private |
Cumulative probability distribution for the i+1st residue's bins, WITHIN each bin. (For example, based on ramachandran probabilities within each ABEGO bin).
The outer vector represents the bin, and the inner vector represents the cumulative probability distribution for each sub-bin within that bin.
Referenced by copy_i_bins_to_iplus1(), set_up_subbins(), subbin_cdf_iplus1(), and summarize_data().
|
private |
The sub-bin identities for the ith residue's bins.
For example, we might divide ABEGO bin A into sub-bins set up as a five-degree grid. The outer vector represents the bin, the middle vector represents sub-bins, the inner vector represents mainchain torsions, and the innermost pairs represent torsion ranges for that mainchain torsion of that sub-bin.
Referenced by copy_i_bins_to_iplus1(), set_up_subbins(), subbin_end_i(), subbin_start_i(), and summarize_data().
|
private |
The sub-bin identities for the i+1st residue's bins.
For example, we might divide ABEGO bin A into sub-bins set up as a five-degree grid. The outer vector represents the bin, the middle vector represents sub-bins, the inner vector represents mainchain torsions, and the innermost pairs represent torsion ranges for that mainchain torsion of that sub-bin.
Referenced by copy_i_bins_to_iplus1(), set_up_subbins(), subbin_end_iplus1(), subbin_start_iplus1(), and summarize_data().
|
private |
The type of sub-bins for residue i.
Each bin can be divided into sub-bins in one of several ways. For example, phi/psi/omega bins (like the ABEGO bins) can be divided into 5x5x90 bins corresponding to the bins used by the Rama scorefunction. This is useful for drawing random phi/psi angles from within the bin.
Referenced by copy_i_bins_to_iplus1(), set_subbin_type_i(), subbin_type_i(), and summarize_data().
|
private |
The type of sub-bins for residue i+1.
Each bin can be divided into sub-bins in one of several ways. For example, phi/psi/omega bins (like the ABEGO bins) can be divided into 5x5x90 bins corresponding to the bins used by the Rama scorefunction. This is useful for drawing random phi/psi angles from within the bin.
Referenced by copy_i_bins_to_iplus1(), set_subbin_type_iplus1(), subbin_type_iplus1(), and summarize_data().
|
private |
Sum of all entries in the probability matrix.
Referenced by finalize(), and summarize_data().
1.8.7