|
Rosetta
|
A class to sample sequences from a PerResidueProbabilitiesMetric and thread them onto the pose. More...
#include <SampleSequenceFromProbabilities.hh>

Public Member Functions | |
| SampleSequenceFromProbabilities () | |
| Constructors ///. More... | |
| ~SampleSequenceFromProbabilities () override | |
| Destructor (important for properly forward-declaring smart-pointer members) More... | |
| void | apply (core::pose::Pose &pose) override |
| Mover Methods ///. More... | |
| void | show (std::ostream &output=std::cout) const override |
| Show the contents of the Mover. More... | |
| void | set_metric (core::simple_metrics::PerResidueProbabilitiesMetricCOP metric) |
| Set the PerResidueProbabilitiesMetric that will be used to calculate the pseudo-perplexity. More... | |
| void | set_use_cached_data (bool use_cache, std::string const &prefix="", std::string const &suffix="") |
| Set a boolean to attempt to find cached data matching the name/custom_type of the passed in simple_metric. Optionally pass any set prefix/suffix. More... | |
| void | set_fail_on_missing_cache (bool fail) |
| If use_cache is set to false, do we fail if no data is found in the pose? Default True. More... | |
| void | set_pos_temp (core::Real pos_temp) |
| Set the positional temperature option. More... | |
| void | set_aa_temp (core::Real aa_temp) |
| Set the amino acid temperature option. More... | |
| void | set_prob_cutoff (core::Real prob_cutoff) |
| Set the probability cutoff option. More... | |
| void | set_delta_prob_cutoff (core::Real delta_prob_cutoff) |
| Set the delta probability cutoff option. More... | |
| void | set_max_mutations (core::Size max_mutations) |
| Set the maximum number of mutations allowed option. More... | |
| void | set_packing (bool packing) |
| Set a bool to define whether we repack. More... | |
| void | set_task_factory (core::pack::task::TaskFactoryOP &task_factory) |
| Set the taskfactory option. More... | |
| void | parse_my_tag (utility::tag::TagCOP tag, basic::datacache::DataMap &data) override |
| Rosetta Scripts Support ///. More... | |
| protocols::moves::MoverOP | fresh_instance () const override |
| required in the context of the parser/scripting scheme More... | |
| protocols::moves::MoverOP | clone () const override |
| required in the context of the parser/scripting scheme More... | |
| std::string | get_name () const override |
| Each derived class must specify its name. The class name. More... | |
| void | provide_citation_info (basic::citation_manager::CitationCollectionList &citations) const override |
| This mover is unpublished. It returns Moritz Ertelt as its author. More... | |
Public Member Functions inherited from protocols::moves::Mover | |
| Mover () | |
| virtual MoverOP | create () |
| MoverCOP | get_self_ptr () const |
| MoverOP | get_self_ptr () |
| MoverCAP | get_self_weak_ptr () const |
| MoverAP | get_self_weak_ptr () |
| Mover (std::string const &type_name) | |
| sets the type for a mover; name_ has been removed (2010/05/14) More... | |
| virtual void | test_move (Pose &pose) |
| : Unit test support function. Apply one move to a given pose. Allows extra test specific functions to be called before applying More... | |
| virtual bool | reinitialize_for_each_job () const |
| Inform the Job Distributor (August '08 vintage) whether this object needs to be freshly regenerated on each use. More... | |
| virtual bool | reinitialize_for_new_input () const |
| Inform the Job Distributor (August '08 vintage) whether this object needs to be regenerated when the input pose is about to change, (for example, if the Mover has special code on the first apply() that is only valid for that one input pose). More... | |
| MoverStatus | get_last_move_status () const |
| end parser interface, start Job Distributor interface///////////// More... | |
| void | reset_status () |
| resets status to SUCCESS, meant to be used before an apply(). The job distributor (august 08 vintage) uses this to ensure non-accumulation of status across apply()s. More... | |
| virtual core::pose::PoseOP | get_additional_output () |
| Mechanism by which a mover may return multiple output poses from a single input pose. More... | |
| void | set_type (std::string const &setting) |
| Set the 'type' string. More... | |
| std::string | get_type () const |
| void | type (const std::string &type_in) |
| Set the 'type' string. More... | |
| std::string const & | type () const |
| Get the set 'type' string. More... | |
| virtual void | set_input_pose (PoseCOP pose) |
| setter for poses contained for rms More... | |
| virtual void | set_native_pose (PoseCOP pose) |
| setter for native poses contained for rms -— we should get rid of this method? it is widely used, but a bit unsafe More... | |
| PoseCOP | get_input_pose () const |
| PoseCOP | get_native_pose () const |
| void | set_current_job (protocols::jobdist::BasicJobCOP job) |
| jobdist::BasicJobCOP | get_current_job () const |
| virtual void | set_current_tag (std::string const &new_tag) |
| std::string | get_current_tag () const |
| A tag is a unique identifier used to identify structures produced by this Mover. get_current_tag() returns the tag, and set_current_tag( std::string tag ) sets the tag. This functionality is not intended for use with the 2008 job distributor. More... | |
| virtual core::Real | last_proposal_density_ratio () |
| virtual void | clear_info () |
| Strings container can be used to return miscellaneous info (as std::string) from a mover, such as notes about the results of apply(). The job distributor (Apr 09 vintage) will check this function to see if your protocol wants to add string info to the Job that ran this mover. One way this can be useful is that later, a JobOutputter may include/append this info to an output file. More... | |
| virtual Strings & | info () |
| non-const accessor More... | |
| virtual Strings const & | info () const |
| const accessor More... | |
Static Public Member Functions | |
| static std::string | mover_name () |
| static void | provide_xml_schema (utility::tag::XMLSchemaDefinition &xsd) |
Static Public Member Functions inherited from protocols::moves::Mover | |
| static std::string | name () |
| static void | register_options () |
| Overload this static method if you access options within the mover. More... | |
Private Member Functions | |
| std::map< core::Size, core::chemical::AA > | sample_mutations (std::map< core::Size, std::map< core::chemical::AA, core::Real >> &values, core::pose::Pose const &pose) const |
| Main function to sample mutations from a probability distribution. More... | |
| std::vector< core::Size > | sample_positions (std::map< core::Size, std::map< core::chemical::AA, core::Real >> &values, core::pose::Pose const &pose) const |
| Helper function to get the ranked positions based on maximum difference in probabilities. More... | |
| core::chemical::AA | sample_amino_acid (std::map< core::chemical::AA, core::Real > const &aa_probs) const |
| Helper function to sample an amino acid from a transformed probability distribution. More... | |
| utility::vector1< std::pair< core::Size, core::Real > > | calculate_position_diffs (std::map< core::Size, std::map< core::chemical::AA, core::Real >> &probabilities, core::pose::Pose const &pose) const |
| Helper function to calculate differences between current and other AAs, as well as disabling unwanted AAs. More... | |
| std::vector< core::Size > | get_ranked_positions (utility::vector1< std::pair< core::Size, core::Real >> &position_diffs, core::pose::Pose const &pose) const |
| Helper function to return positions ranked based on their delta_probability value to the current AA. More... | |
Static Private Member Functions | |
| static std::string | construct_modified_sequence (core::pose::Pose &pose, std::map< core::Size, core::chemical::AA > &mutations) |
| Helper function to return a string of three amino acid letters from the proposed mutations for the SimpleThreadingMover. More... | |
| static bool | is_aa_allowed_by_task (core::pack::task::ResidueLevelTask const &rlt, core::chemical::AA aa) |
| Helper function to check whether the AA is set to designable in the Packer. More... | |
Private Attributes | |
| core::simple_metrics::PerResidueProbabilitiesMetricCOP | metric_ = nullptr |
| core::Real | pos_temp_ = 1.0 |
| core::Real | aa_temp_ = 1.0 |
| core::Real | prob_cutoff_ = 0.0001 |
| core::Real | delta_prob_cutoff_ = 0.0 |
| core::Size | max_mutations_ = 10000 |
| bool | packing_ = true |
| bool | use_cache_ = false |
| std::string | cache_prefix_ |
| std::string | cache_suffix_ |
| bool | fail_on_missing_cache_ = true |
| core::pack::task::TaskFactoryOP | task_factory_ |
Additional Inherited Members | |
Public Types inherited from protocols::moves::Mover | |
| typedef utility::tag::TagCOP | TagCOP |
| typedef core::pose::Pose | Pose |
| typedef core::pose::PoseCOP | PoseCOP |
| typedef std::list< std::string > | Strings |
Protected Member Functions inherited from protocols::moves::Mover | |
| void | set_last_move_status (MoverStatus status) |
| nonvirtual setter for MoverStatus last_status_. Protected means that only the mover itself will be able to change its own status. The job distributor (august 08 vintage) is aware of status set with this function and will do what the MoverStatus says. More... | |
A class to sample sequences from a PerResidueProbabilitiesMetric and thread them onto the pose.
| protocols::simple_moves::SampleSequenceFromProbabilities::SampleSequenceFromProbabilities | ( | ) |
Constructors ///.
Default constructor
|
overridedefault |
Destructor (important for properly forward-declaring smart-pointer members)
|
overridevirtual |
Mover Methods ///.
Apply the mover
Implements protocols::moves::Mover.
References cache_prefix_, cache_suffix_, construct_modified_sequence(), fail_on_missing_cache_, metric_, packing_, sample_mutations(), protocols::simple_moves::TR(), and use_cache_.
|
private |
Helper function to calculate differences between current and other AAs, as well as disabling unwanted AAs.
References core::conformation::Residue::aa(), protocols::cluster::calibur::aa, delta_prob_cutoff_, is_aa_allowed_by_task(), prob_cutoff_, core::pose::Pose::residue(), task_factory_, and protocols::simple_moves::TR().
Referenced by sample_positions().
|
overridevirtual |
required in the context of the parser/scripting scheme
Reimplemented from protocols::moves::Mover.
|
staticprivate |
Helper function to return a string of three amino acid letters from the proposed mutations for the SimpleThreadingMover.
References core::conformation::Residue::aa(), protocols::cluster::calibur::aa, core::chemical::name_from_aa(), core::pose::Pose::residue(), and core::pose::Pose::total_residue().
Referenced by apply().
|
overridevirtual |
required in the context of the parser/scripting scheme
Reimplemented from protocols::moves::Mover.
|
overridevirtual |
Each derived class must specify its name. The class name.
Implements protocols::moves::Mover.
References mover_name().
|
private |
Helper function to return positions ranked based on their delta_probability value to the current AA.
References max_mutations_, pos_temp_, core::scoring::rg, core::id::swap(), and core::pose::Pose::total_residue().
Referenced by sample_positions().
|
staticprivate |
Helper function to check whether the AA is set to designable in the Packer.
References protocols::cluster::calibur::aa, core::pack::task::ResidueLevelTask::allowed_residue_types(), core::pack::task::ResidueLevelTask::being_designed(), and core::pack::task::ResidueLevelTask::being_packed().
Referenced by calculate_position_diffs().
|
static |
|
overridevirtual |
Rosetta Scripts Support ///.
parse XML tag (to use this Mover in Rosetta Scripts)
Reimplemented from protocols::moves::Mover.
References aa_temp_, delta_prob_cutoff_, fail_on_missing_cache_, core::simple_metrics::get_metric_from_datamap_and_subtags(), max_mutations_, core::pack::task::parse_task_operations(), pos_temp_, prob_cutoff_, set_aa_temp(), set_delta_prob_cutoff(), set_fail_on_missing_cache(), set_max_mutations(), set_metric(), set_packing(), set_pos_temp(), set_prob_cutoff(), set_task_factory(), and set_use_cached_data().
|
overridevirtual |
This mover is unpublished. It returns Moritz Ertelt as its author.
Reimplemented from protocols::moves::Mover.
|
static |
|
private |
Helper function to sample an amino acid from a transformed probability distribution.
References aa_temp_, core::kinematics::distance(), and protocols::simple_moves::TR().
Referenced by sample_mutations().
|
private |
Main function to sample mutations from a probability distribution.
Creates a discrete distribution based on the delta_prob (curr_AA - max_prob_AA) of each position and draws from that distribution taking into a account the pos_temp_ which controls the randomness. The idea behind this is that positions with the larges disagreement between current AA and predicted AAs will be mutated first. Also checks the probability_cutoff_, delta_probability_cutoff and present TaskOperations and sets probabilities not meeting the requirements to zero. Returns as many positions with their proposed AA as are set through the max_mutation_ option set by the user. The randomness of choice of AA is controlled by the aa_temp_ option.
| [in] | pose | Uses the pose to get the current residues and check for TaksOps. |
| [in] | values | The values of a PerResidueProbabilitiesMetric. |
References sample_amino_acid(), sample_positions(), and protocols::simple_moves::TR().
Referenced by apply().
|
private |
Helper function to get the ranked positions based on maximum difference in probabilities.
private methods ///
References calculate_position_diffs(), and get_ranked_positions().
Referenced by sample_mutations().
| void protocols::simple_moves::SampleSequenceFromProbabilities::set_aa_temp | ( | core::Real | aa_temp | ) |
| void protocols::simple_moves::SampleSequenceFromProbabilities::set_delta_prob_cutoff | ( | core::Real | delta_prob_cutoff | ) |
Set the delta probability cutoff option.
References delta_prob_cutoff_.
Referenced by parse_my_tag().
| void protocols::simple_moves::SampleSequenceFromProbabilities::set_fail_on_missing_cache | ( | bool | fail | ) |
If use_cache is set to false, do we fail if no data is found in the pose? Default True.
References fail_on_missing_cache_.
Referenced by parse_my_tag().
| void protocols::simple_moves::SampleSequenceFromProbabilities::set_max_mutations | ( | core::Size | max_mutations | ) |
Set the maximum number of mutations allowed option.
References max_mutations_.
Referenced by parse_my_tag().
| void protocols::simple_moves::SampleSequenceFromProbabilities::set_metric | ( | core::simple_metrics::PerResidueProbabilitiesMetricCOP | metric | ) |
Set the PerResidueProbabilitiesMetric that will be used to calculate the pseudo-perplexity.
References metric_.
Referenced by parse_my_tag().
| void protocols::simple_moves::SampleSequenceFromProbabilities::set_packing | ( | bool | packing | ) |
| void protocols::simple_moves::SampleSequenceFromProbabilities::set_pos_temp | ( | core::Real | pos_temp | ) |
| void protocols::simple_moves::SampleSequenceFromProbabilities::set_prob_cutoff | ( | core::Real | prob_cutoff | ) |
| void protocols::simple_moves::SampleSequenceFromProbabilities::set_task_factory | ( | core::pack::task::TaskFactoryOP & | task_factory | ) |
| void protocols::simple_moves::SampleSequenceFromProbabilities::set_use_cached_data | ( | bool | use_cache, |
| std::string const & | prefix = "", |
||
| std::string const & | suffix = "" |
||
| ) |
Set a boolean to attempt to find cached data matching the name/custom_type of the passed in simple_metric. Optionally pass any set prefix/suffix.
This will allow the filter to re-use previously calculated data.
References cache_prefix_, cache_suffix_, protocols::simple_moves::TR(), and use_cache_.
Referenced by parse_my_tag().
|
overridevirtual |
Show the contents of the Mover.
Reimplemented from protocols::moves::Mover.
References protocols::moves::Mover::show().
Referenced by protocols::simple_moves::operator<<().
|
private |
Referenced by parse_my_tag(), sample_amino_acid(), and set_aa_temp().
|
private |
Referenced by apply(), and set_use_cached_data().
|
private |
Referenced by apply(), and set_use_cached_data().
|
private |
Referenced by calculate_position_diffs(), parse_my_tag(), and set_delta_prob_cutoff().
|
private |
Referenced by apply(), parse_my_tag(), and set_fail_on_missing_cache().
|
private |
Referenced by get_ranked_positions(), parse_my_tag(), and set_max_mutations().
|
private |
Referenced by apply(), and set_metric().
|
private |
Referenced by apply(), and set_packing().
|
private |
Referenced by get_ranked_positions(), parse_my_tag(), and set_pos_temp().
|
private |
Referenced by calculate_position_diffs(), parse_my_tag(), and set_prob_cutoff().
|
private |
Referenced by calculate_position_diffs(), and set_task_factory().
|
private |
Referenced by apply(), and set_use_cached_data().