![]() |
Rosetta
2021.16
|
A class for storing the helix assignments for a pose. This can represent those proposed from an input file, or those at the current state of a trajectory. More...
#include <HBPHelixAssignments.hh>

Public Member Functions | |
| HBPHelixAssignments () | |
| Default constructor. More... | |
| HBPHelixAssignments (HBPHelixAssignments const &src) | |
| Copy constructor. More... | |
| ~HBPHelixAssignments () override | |
| Destructor. More... | |
| HBPHelixAssignmentsOP | clone () const |
| Create a copy of this object and return an owning pointer to the copy. More... | |
| HBPHelixAssignments & | operator= (HBPHelixAssignments const &src) |
| Assignment operator. More... | |
| void | clear () |
| Reset this object. More... | |
| void | initialize_from_file_contents (std::string const &file_contents) |
| Set this object up from the contents of a file. More... | |
| bool | is_in_helix (core::Size const sequence_index) const |
| Given a sequence index, determine whether it is in a helix. More... | |
| bool | try_nucleating_helix (core::Size const seqpos, core::pose::Pose const &pose, HBPHelixAssignments const &reference_helix_assignments) |
| Roll a die and decide whether to nucleate a helix at the present position. More... | |
| bool | try_elongating_helix (core::Size const seqpos, core::pose::Pose const &pose, HBPHelixAssignments const &reference_helix_assignments) |
| Roll a die and decide whether to elongate a helix at the present position. More... | |
| bool | try_retracting_helix (core::Size const seqpos, core::pose::Pose const &pose, HBPHelixAssignments const &reference_helix_assignments) |
| Roll a die and decide whether to contract a helix at the present position. More... | |
| bool | try_perturbing_global_helix_parameters () |
| Try perturbing the parameters for all helices. More... | |
| bool | try_perturbing_local_helix_parameters () |
| Try perturbing the parameters of individual helices, that are not set to copy globals. More... | |
| bool | confine_to_user_defined_helices () const |
| Are we supposed to keep sampled helices within the user-defined ranges? More... | |
| bool | generate_torsion_values_for_helices (utility::vector1< std::map< core::id::TorsionID, core::Real > > &torsion_values_out, core::pose::Pose const &pose_for_reference) const |
| Generate a map of torsion ID -> torsion value for each helix, and return a vector of these maps. More... | |
| core::Size | get_containing_helix_index (core::Size const seqpos) const |
| Given a sequence position, get the helix index that contains it. More... | |
Private Member Functions | |
| HBPHelixOP | helix_from_seqpos (core::Size const position) |
| Get a nonconst owning pointer to the helix containing a given sequence position. More... | |
| HBPHelixCOP | helix_from_seqpos (core::Size const position) const |
| Get a const owning pointer to the helix containing a given sequence position. More... | |
| HBPHelixOP | find_adjacent_helix (core::Size seqpos) |
| Loop through all helices and find a helix that this sequence position is adjacent to. More... | |
| bool | helix_types_match (HBPHelix const &first_helix, HBPHelix const &second_helix) const |
| Are two helices of the same type? More... | |
| void | check_for_helix_merges (HBPHelixCOP const current_helix=nullptr) |
| Check whether the addition or elongation of current_helix causes a new contiguous stretch of helix, and if so, replace helix records in the helices_ list with a single contiguous helix. More... | |
| void | merge_helices (core::Size const first_helix_index, core::Size const second_helix_index, HBPHelixCOP const current_helix=nullptr) |
| Merge two helices together. More... | |
| void | resolve_mismatching_helix_overlap (core::Size const helix1_index, core::Size const helix2_index) |
| Given two overlapping helices of different types, prevent them from overlapping. More... | |
| void | pull_out_global_block (std::string const &file_contents, std::string &global_block) const |
| Given file contents, pull out the first BEGIN_GLOBALS...END_GLOBALS block, and throw an error message if any other occurrences of this exist in the file. More... | |
| void | initialize_global_options_from_file_contents (std::string const &file_contents) |
| Read the BEGIN_GLOBALS...END_GLOBALS block in the file contents and set up global options. More... | |
| void | pull_out_helix_blocks (std::string const &file_contents, utility::vector1< std::string > &helix_blocks) const |
| Given file contents, pull out all of the stuff in between the BEGIN_HELIX and END_HELIX lines. More... | |
| void | initialize_helices_from_file_contents (std::string const &file_contents) |
| Read BEGIN_HELIX...END_HELIX blocks in the file contents and set up local helix options. More... | |
| HBPHelixOP | add_helix () |
| Add a helix and return an owning pointer to it. More... | |
| HBPHelixOP | add_helix (core::Size const startpos, core::Size const endpos, HBPHelix const &reference_helix) |
| Add a helix and return an owning pointer to it, initializing its start, end, and parameters. More... | |
| void | remove_helix (HBPHelixOP helix_to_remove) |
| Remove a helix. More... | |
Private Attributes | |
| utility::vector1< HBPHelixOP > | helices_ |
| Stored helices. More... | |
| protocols::helical_bundle::BundleParametrizationCalculatorOP | global_bundle_calculator_ |
| A calculator object for the Crick equations. More... | |
| bool | common_r0_ |
| Is r0 shared among all helices? More... | |
| bool | common_omega0_ |
| Is omega0 shared among all helices? More... | |
| bool | common_delta_omega1_ |
| Is delta_omega1 shared among all helices? More... | |
| bool | confine_to_user_defined_helices_ |
| Prevent expansion of helices beyond user-defined helices? More... | |
| core::Real | global_r0_min_ |
| Global min setting for r0. Can be overridden in individual helices. More... | |
| core::Real | global_r0_max_ |
| Global max setting for r0. Can be overridden in individual helices. More... | |
| core::Real | global_omega0_min_ |
| Global min setting for omega0. Can be overridden in individual helices. More... | |
| core::Real | global_omega0_max_ |
| Global max setting for omega0. Can be overridden in individual helices. More... | |
| core::Real | global_delta_omega1_min_ |
| Global min setting for delta_omega1. Can be overridden in individual helices. More... | |
| core::Real | global_delta_omega1_max_ |
| Global max setting for delta_omega1. Can be overridden in individual helices. More... | |
| std::string | global_crick_params_file_ |
| The global Crick parameters file name. More... | |
| core::Real | nucleation_prob_ |
| Probability of nucleating a helix. More... | |
| core::Real | extension_prob_ |
| Probability of extending a helix. More... | |
| core::Real | retraction_prob_ |
| Probability of retracting a helix. More... | |
| core::Real | global_perturbation_prob_ |
| The probability of doing a global Crick parameter perturbation move. More... | |
| core::Real | global_fractional_perturbation_magnitude_ |
| The magnitude of parameter perturbations. More... | |
Friends | |
| class | ::HBPHelixAssignmentsTests |
A class for storing the helix assignments for a pose. This can represent those proposed from an input file, or those at the current state of a trajectory.
| protocols::helical_bundle_predict::HBPHelixAssignments::HBPHelixAssignments | ( | ) |
Default constructor.
References clear().
| protocols::helical_bundle_predict::HBPHelixAssignments::HBPHelixAssignments | ( | HBPHelixAssignments const & | src | ) |
|
override |
Destructor.
|
private |
Add a helix and return an owning pointer to it.
Parameters are initialized from globals.
References extension_prob_, global_bundle_calculator_, global_crick_params_file_, global_delta_omega1_max_, global_delta_omega1_min_, global_omega0_max_, global_omega0_min_, global_r0_max_, global_r0_min_, helices_, nucleation_prob_, and retraction_prob_.
Referenced by initialize_helices_from_file_contents(), merge_helices(), and try_nucleating_helix().
|
private |
Add a helix and return an owning pointer to it, initializing its start, end, and parameters.
Parameters are initialized from reference_helix.
References helices_.
|
private |
Check whether the addition or elongation of current_helix causes a new contiguous stretch of helix, and if so, replace helix records in the helices_ list with a single contiguous helix.
When helices are merged, the helix contributing parameters is chosen randomly. If current_helix is not nullptr, then we do not allow that helix to contribute the parameters – i.e. they are chosen randomly from one of the other helices, or we just use the other helix if there's only one.
References helices_, helix_types_match(), merge_helices(), and resolve_mismatching_helix_overlap().
Referenced by try_elongating_helix(), and try_nucleating_helix().
| void protocols::helical_bundle_predict::HBPHelixAssignments::clear | ( | ) |
Reset this object.
References common_delta_omega1_, common_omega0_, common_r0_, confine_to_user_defined_helices_, extension_prob_, global_bundle_calculator_, global_crick_params_file_, global_delta_omega1_max_, global_delta_omega1_min_, global_fractional_perturbation_magnitude_, global_omega0_max_, global_omega0_min_, global_perturbation_prob_, global_r0_max_, global_r0_min_, helices_, nucleation_prob_, and retraction_prob_.
Referenced by HBPHelixAssignments(), initialize_from_file_contents(), and protocols::helical_bundle_predict::HBP_HelixCoilMoveGenerator::set_up_user_helix_assignments().
| HBPHelixAssignmentsOP protocols::helical_bundle_predict::HBPHelixAssignments::clone | ( | ) | const |
Create a copy of this object and return an owning pointer to the copy.
|
inline |
Are we supposed to keep sampled helices within the user-defined ranges?
References confine_to_user_defined_helices_.
Referenced by try_elongating_helix(), and try_nucleating_helix().
|
private |
Loop through all helices and find a helix that this sequence position is adjacent to.
. If the position is adjacent to no helix, returns nullptr. If the position is adjacent to two helices (i.e. it bridges two helices separated by one residue), we pick one with 50/50 odds.
References helices_, and is_in_helix().
Referenced by try_elongating_helix().
| bool protocols::helical_bundle_predict::HBPHelixAssignments::generate_torsion_values_for_helices | ( | utility::vector1< std::map< core::id::TorsionID, core::Real > > & | torsion_values_out, |
| core::pose::Pose const & | pose_for_reference | ||
| ) | const |
Generate a map of torsion ID -> torsion value for each helix, and return a vector of these maps.
References helices_.
Referenced by protocols::helical_bundle_predict::HBP_HelixCoilMoveGenerator::add_helix_update_moves().
| core::Size protocols::helical_bundle_predict::HBPHelixAssignments::get_containing_helix_index | ( | core::Size const | seqpos | ) | const |
Given a sequence position, get the helix index that contains it.
Returns zero if no helix contains this sequence position.
References helices_.
Referenced by protocols::helical_bundle_predict::HBP_HelixCoilMoveGenerator::add_helix_update_moves().
|
private |
Get a nonconst owning pointer to the helix containing a given sequence position.
Returns nullptr if no helix contains that sequence position.
References helices_.
Referenced by try_nucleating_helix(), and try_retracting_helix().
|
private |
Get a const owning pointer to the helix containing a given sequence position.
Returns nullptr if no helix contains that sequence position.
References helices_.
|
private |
Are two helices of the same type?
References protocols::helical_bundle_predict::HBPHelix::crick_params_filename().
Referenced by check_for_helix_merges().
| void protocols::helical_bundle_predict::HBPHelixAssignments::initialize_from_file_contents | ( | std::string const & | file_contents | ) |
Set this object up from the contents of a file.
Warning! Reads Crick params files from disk!
References clear(), initialize_global_options_from_file_contents(), and initialize_helices_from_file_contents().
Referenced by protocols::helical_bundle_predict::HBP_HelixCoilMoveGenerator::set_up_user_helix_assignments().
|
private |
Read the BEGIN_GLOBALS...END_GLOBALS block in the file contents and set up global options.
Warning! Reads Crick params files from disk!
References protocols::helical_bundle::BPC_delta_omega1, protocols::helical_bundle::BPC_omega0, protocols::helical_bundle::BPC_r0, common_delta_omega1_, common_omega0_, common_r0_, confine_to_user_defined_helices_, extension_prob_, global_bundle_calculator_, global_crick_params_file_, global_delta_omega1_max_, global_delta_omega1_min_, global_fractional_perturbation_magnitude_, global_omega0_max_, global_omega0_min_, global_perturbation_prob_, global_r0_max_, global_r0_min_, nucleation_prob_, pull_out_global_block(), and retraction_prob_.
Referenced by initialize_from_file_contents().
|
private |
Read BEGIN_HELIX...END_HELIX blocks in the file contents and set up local helix options.
Warning! Triggers read from disk if Crick params file is set.
References add_helix(), common_delta_omega1_, common_omega0_, common_r0_, pull_out_helix_blocks(), and protocols::hybridization::val.
Referenced by initialize_from_file_contents().
| bool protocols::helical_bundle_predict::HBPHelixAssignments::is_in_helix | ( | core::Size const | sequence_index | ) | const |
Given a sequence index, determine whether it is in a helix.
References helices_.
Referenced by protocols::helical_bundle_predict::HBP_HelixCoilMoveGenerator::add_helix_update_moves(), protocols::helical_bundle_predict::HBP_HelixCoilMoveGenerator::add_nonhelix_small_moves(), find_adjacent_helix(), try_elongating_helix(), try_nucleating_helix(), and try_retracting_helix().
|
private |
Merge two helices together.
If current_helix is not nullptr, then we randomly pick one of the two helices to provide the parameters. If current_helix is nullptr and it matches one of the two helices, then the other provides the parameters.
References add_helix(), helices_, protocols::mean_field::max(), protocols::mean_field::min(), and remove_helix().
Referenced by check_for_helix_merges().
| HBPHelixAssignments & protocols::helical_bundle_predict::HBPHelixAssignments::operator= | ( | HBPHelixAssignments const & | src | ) |
Assignment operator.
Deep-clones helices.
References common_delta_omega1_, common_omega0_, common_r0_, confine_to_user_defined_helices_, extension_prob_, global_bundle_calculator_, global_crick_params_file_, global_delta_omega1_max_, global_delta_omega1_min_, global_fractional_perturbation_magnitude_, global_omega0_max_, global_omega0_min_, global_perturbation_prob_, global_r0_max_, global_r0_min_, helices_, nucleation_prob_, and retraction_prob_.
|
private |
Given file contents, pull out the first BEGIN_GLOBALS...END_GLOBALS block, and throw an error message if any other occurrences of this exist in the file.
Omits the BEGIN_GLOBALS and END_GLOBALS lines.
Referenced by initialize_global_options_from_file_contents().
|
private |
Given file contents, pull out all of the stuff in between the BEGIN_HELIX and END_HELIX lines.
Omits the BEGIN_HELIX and END_HELIX lines.
Referenced by initialize_helices_from_file_contents().
|
private |
Remove a helix.
References helices_.
Referenced by merge_helices(), resolve_mismatching_helix_overlap(), and try_retracting_helix().
|
private |
Given two overlapping helices of different types, prevent them from overlapping.
The cutoff point is randomly chosen within the overlap region.
References helices_, and remove_helix().
Referenced by check_for_helix_merges().
| bool protocols::helical_bundle_predict::HBPHelixAssignments::try_elongating_helix | ( | core::Size const | seqpos, |
| core::pose::Pose const & | pose, | ||
| HBPHelixAssignments const & | reference_helix_assignments | ||
| ) |
Roll a die and decide whether to elongate a helix at the present position.
If we do it, then we add one residue to the helix (updating the helices_ list). The probabilities for elongation are taken from the adjacent helix.
References check_for_helix_merges(), confine_to_user_defined_helices(), find_adjacent_helix(), and is_in_helix().
Referenced by protocols::helical_bundle_predict::HBP_HelixCoilMoveGenerator::add_helix_elongation_moves().
| bool protocols::helical_bundle_predict::HBPHelixAssignments::try_nucleating_helix | ( | core::Size const | seqpos, |
| core::pose::Pose const & | pose, | ||
| HBPHelixAssignments const & | reference_helix_assignments | ||
| ) |
Roll a die and decide whether to nucleate a helix at the present position.
If we do it, then we add one turn of helix as a new helix (updating the helices_ list), and we copy helix parameters from reference_helix_assignments. The probabilities for nucleation are taken from reference_helix_assignments.
If we do it, then we add one turn of helix as a new helix (updating the helices_ list), and we copy helix paramters from reference_helix_assignments. The probabilities for nucleation are taken from reference_helix_assignments.
References add_helix(), protocols::helical_bundle::BPC_delta_omega1, protocols::helical_bundle::BPC_omega0, protocols::helical_bundle::BPC_r0, check_for_helix_merges(), common_delta_omega1_, common_omega0_, common_r0_, confine_to_user_defined_helices(), helix_from_seqpos(), is_in_helix(), and core::pose::Pose::total_residue().
Referenced by protocols::helical_bundle_predict::HBP_HelixCoilMoveGenerator::add_helix_nucleation_moves().
| bool protocols::helical_bundle_predict::HBPHelixAssignments::try_perturbing_global_helix_parameters | ( | ) |
Try perturbing the parameters for all helices.
Updates individual helices if parameters are perturbed.
References protocols::helical_bundle::BPC_delta_omega1, protocols::helical_bundle::BPC_omega0, protocols::helical_bundle::BPC_r0, common_delta_omega1_, common_omega0_, common_r0_, global_bundle_calculator_, global_delta_omega1_max_, global_delta_omega1_min_, global_fractional_perturbation_magnitude_, global_omega0_max_, global_omega0_min_, global_perturbation_prob_, global_r0_max_, global_r0_min_, and helices_.
Referenced by protocols::helical_bundle_predict::HBP_HelixCoilMoveGenerator::add_global_parameter_perturbations().
| bool protocols::helical_bundle_predict::HBPHelixAssignments::try_perturbing_local_helix_parameters | ( | ) |
Try perturbing the parameters of individual helices, that are not set to copy globals.
References protocols::helical_bundle::BPC_delta_omega1, protocols::helical_bundle::BPC_omega0, protocols::helical_bundle::BPC_r0, common_delta_omega1_, common_omega0_, common_r0_, global_fractional_perturbation_magnitude_, global_perturbation_prob_, and helices_.
Referenced by protocols::helical_bundle_predict::HBP_HelixCoilMoveGenerator::add_local_parameter_perturbations().
| bool protocols::helical_bundle_predict::HBPHelixAssignments::try_retracting_helix | ( | core::Size const | seqpos, |
| core::pose::Pose const & | pose, | ||
| HBPHelixAssignments const & | reference_helix_assignments | ||
| ) |
Roll a die and decide whether to contract a helix at the present position.
If we do it, then we subtract one residue from the helix (updating the helices_ list). The probabilities for retraction are taken from the adjacent helix. If the helix shrinks to zero size, then we remove it from the helices_ list.
References helix_from_seqpos(), is_in_helix(), and remove_helix().
Referenced by protocols::helical_bundle_predict::HBP_HelixCoilMoveGenerator::add_helix_retraction_moves().
|
friend |
|
private |
Is delta_omega1 shared among all helices?
False by default.
Referenced by clear(), initialize_global_options_from_file_contents(), initialize_helices_from_file_contents(), operator=(), try_nucleating_helix(), try_perturbing_global_helix_parameters(), and try_perturbing_local_helix_parameters().
|
private |
Is omega0 shared among all helices?
False by default.
Referenced by clear(), initialize_global_options_from_file_contents(), initialize_helices_from_file_contents(), operator=(), try_nucleating_helix(), try_perturbing_global_helix_parameters(), and try_perturbing_local_helix_parameters().
|
private |
Is r0 shared among all helices?
False by default.
Referenced by clear(), initialize_global_options_from_file_contents(), initialize_helices_from_file_contents(), operator=(), try_nucleating_helix(), try_perturbing_global_helix_parameters(), and try_perturbing_local_helix_parameters().
|
private |
Prevent expansion of helices beyond user-defined helices?
True by default.
Referenced by clear(), confine_to_user_defined_helices(), initialize_global_options_from_file_contents(), and operator=().
|
private |
Probability of extending a helix.
Defaults to 5%
Referenced by add_helix(), clear(), initialize_global_options_from_file_contents(), and operator=().
|
private |
A calculator object for the Crick equations.
Referenced by add_helix(), clear(), HBPHelixAssignments(), initialize_global_options_from_file_contents(), operator=(), and try_perturbing_global_helix_parameters().
|
private |
The global Crick parameters file name.
Referenced by add_helix(), clear(), initialize_global_options_from_file_contents(), and operator=().
|
private |
Global max setting for delta_omega1. Can be overridden in individual helices.
Referenced by add_helix(), clear(), initialize_global_options_from_file_contents(), operator=(), and try_perturbing_global_helix_parameters().
|
private |
Global min setting for delta_omega1. Can be overridden in individual helices.
Referenced by add_helix(), clear(), initialize_global_options_from_file_contents(), operator=(), and try_perturbing_global_helix_parameters().
|
private |
The magnitude of parameter perturbations.
This is expressed as a fraction of the difference between the minimum and maximum parameter values. The actual magnitude of perturbation is a random Gaussian times this value.
Referenced by clear(), initialize_global_options_from_file_contents(), operator=(), try_perturbing_global_helix_parameters(), and try_perturbing_local_helix_parameters().
|
private |
Global max setting for omega0. Can be overridden in individual helices.
Referenced by add_helix(), clear(), initialize_global_options_from_file_contents(), operator=(), and try_perturbing_global_helix_parameters().
|
private |
Global min setting for omega0. Can be overridden in individual helices.
Referenced by add_helix(), clear(), initialize_global_options_from_file_contents(), operator=(), and try_perturbing_global_helix_parameters().
|
private |
The probability of doing a global Crick parameter perturbation move.
Referenced by clear(), initialize_global_options_from_file_contents(), operator=(), try_perturbing_global_helix_parameters(), and try_perturbing_local_helix_parameters().
|
private |
Global max setting for r0. Can be overridden in individual helices.
Referenced by add_helix(), clear(), initialize_global_options_from_file_contents(), operator=(), and try_perturbing_global_helix_parameters().
|
private |
Global min setting for r0. Can be overridden in individual helices.
Referenced by add_helix(), clear(), initialize_global_options_from_file_contents(), operator=(), and try_perturbing_global_helix_parameters().
|
private |
Stored helices.
Referenced by add_helix(), check_for_helix_merges(), clear(), find_adjacent_helix(), generate_torsion_values_for_helices(), get_containing_helix_index(), HBPHelixAssignments(), helix_from_seqpos(), is_in_helix(), merge_helices(), operator=(), remove_helix(), resolve_mismatching_helix_overlap(), try_perturbing_global_helix_parameters(), and try_perturbing_local_helix_parameters().
|
private |
Probability of nucleating a helix.
Defaults to 1%.
Referenced by add_helix(), clear(), initialize_global_options_from_file_contents(), and operator=().
|
private |
Probability of retracting a helix.
Defaults to 3%.
Referenced by add_helix(), clear(), initialize_global_options_from_file_contents(), and operator=().
1.8.7