|
Rosetta
|
A metric for estimating amino acid probabilities using the ProteinMPNN model. More...
#include <ProteinMPNNProbabilitiesMetric.hh>

Public Member Functions | |
| ProteinMPNNProbabilitiesMetric () | |
| Constructors ///. More... | |
| ProteinMPNNProbabilitiesMetric (ProteinMPNNProbabilitiesMetric const &src) | |
| Copy constructor (not needed unless you need deep copies) More... | |
| ~ProteinMPNNProbabilitiesMetric () override | |
| Destructor (important for properly forward-declaring smart-pointer members) More... | |
| std::map< core::Size, std::map< core::chemical::AA, core::Real > > | calculate (core::pose::Pose const &pose) const override |
| Metric Methods ///. More... | |
| std::string | name () const override |
| Name of the class. More... | |
| std::string | metric () const override |
| Name of the metric. More... | |
| void | parse_my_tag (utility::tag::TagCOP tag, basic::datacache::DataMap &data) override |
| called by parse_my_tag – should not be used directly More... | |
| core::simple_metrics::SimpleMetricOP | clone () const override |
| std::string | write_pssm () const |
| Get the output filename of the pssm. More... | |
| void | set_residue_selector (core::select::residue_selector::ResidueSelectorCOP selector_in) |
| Set the residue selector that we'll be using. More... | |
| void | set_coord_selector_rs (core::select::residue_selector::ResidueSelectorCOP coord_selector_rs) |
| Set residues whose coordinates should be passed to ProteinMPNN. More... | |
| void | set_sequence_mask_selector_rs (core::select::residue_selector::ResidueSelectorCOP sequence_mask_selector_rs) |
| Set residues whose sequence should be masked. More... | |
| void | set_tied_pos_rs (utility::vector1< utility::vector1< core::select::residue_selector::ResidueSelectorCOP > > tied_pos_rs) |
| Set tied positions. This is a collection of lists, each list containing residue selectors that should be tied. More... | |
| core::select::residue_selector::ResidueSelectorCOP | residue_selector () const |
| Get the residue selector. More... | |
| void | set_deterministic_flag (bool deterministic_flag) |
| Set to true to run in deterministic mode. More... | |
| bool | deterministic_flag () const |
| Get the deterministic_flag mode. More... | |
Public Member Functions inherited from core::simple_metrics::PerResidueProbabilitiesMetric | |
| PerResidueProbabilitiesMetric () | |
| ~PerResidueProbabilitiesMetric () override | |
| PerResidueProbabilitiesMetric (PerResidueProbabilitiesMetric const &other) | |
| PerResidueProbabilitiesMetric & | operator= (PerResidueProbabilitiesMetric const &) |
| void | apply (std::string const &out_label, pose::Pose &pose, bool override_existing_data=false) const override |
| Calculate the metric and add it to the pose as a score. labeled as out_label. More... | |
| void | set_residue_selector (select::residue_selector::ResidueSelectorCOP selector) |
| Set a ResidueSelector for which we will calculate values over. More... | |
| void | set_output_as_pdb_nums (bool output_as_pdb_nums) |
| Set to output in PDB numbering instead of Rosetta during the Apply function, which adds the data to pose as extra scores. More... | |
| std::map< core::Size, std::map< core::chemical::AA, core::Real > > | cached_calculate (pose::Pose const &pose, bool use_cache, std::string const &prefix="", std::string const &suffix="", bool fail_on_missing_cache=true, bool use_ref_pose_for_cache=true) const |
| Grab the data from the pose if it exists or calculate the metric. More... | |
| utility::vector1< std::string > | get_metric_names () const override |
| Get the submetric names that this Metric will calculate. More... | |
| select::residue_selector::ResidueSelectorCOP | get_selector () const |
| Get the set residue selector of this class. More... | |
| virtual void | parse_per_residue_tag (utility::tag::TagCOP tag, basic::datacache::DataMap &data) |
| Parse the base class tag. Keep required interface for parse_my_tag. More... | |
| virtual void | apply (std::string const &out_label, pose::Pose &pose, bool override_existing_data=false) const=0 |
Calculate the metric and add it to the Score, which is output into a scorefile - labeled as label Must be implemented by derived classes. More... | |
| void | apply (pose::Pose &pose, std::string const &prefix="", std::string const &suffix="", bool override_existing_data=false) const |
| Calculate the metric and add it to the Score, which is output into a scorefile - labeled as prefix+metric+suffix. More... | |
Public Member Functions inherited from core::simple_metrics::SimpleMetric | |
| SimpleMetric (std::string const &simple_metric_type) | |
| ~SimpleMetric () override | |
| SimpleMetric (SimpleMetric const &other) | |
| SimpleMetric & | operator= (SimpleMetric const &) |
| void | apply (pose::Pose &pose, std::string const &prefix="", std::string const &suffix="", bool override_existing_data=false) const |
| Calculate the metric and add it to the Score, which is output into a scorefile - labeled as prefix+metric+suffix. More... | |
| void | set_custom_type (std::string const &custom_type) |
| std::string | get_custom_type () const |
| Additional setting to prefix/suffix. More... | |
| virtual void | parse_base_tag (utility::tag::TagCOP tag) |
| Parse the base class tag. Keep required interface for parse_my_tag. More... | |
| std::string | simple_metric_type () const |
| std::string | get_final_sm_type () const |
| Get the final name of this metric including its simple_metric_type_ name and any set custom type. More... | |
Static Public Member Functions | |
| static std::string | name_static () |
| Name of the class for creator. More... | |
| static void | provide_xml_schema (utility::tag::XMLSchemaDefinition &xsd) |
Static Public Member Functions inherited from core::simple_metrics::PerResidueProbabilitiesMetric | |
| static void | output_sequence_profile (std::string const &sequence, std::map< core::Size, std::map< core::chemical::AA, core::Real >> const &logit_map, std::string const &output_filename) |
| Format the probabilities in psi-blast position-specific-scoring-matrix (PSSM) format and write to file. More... | |
| static void | add_schema (utility::tag::XMLSchemaComplexTypeGeneratorOP complex_schema) |
| Add options to the schema from this base class. More... | |
Static Public Member Functions inherited from core::simple_metrics::SimpleMetric | |
| static utility::tag::XMLSchemaComplexTypeGeneratorOP | complex_type_generator_for_simple_metric (utility::tag::XMLSchemaDefinition &) |
Private Member Functions | |
| void | provide_citation_info (basic::citation_manager::CitationCollectionList &citations) const override |
| This metric is currently unpublished, returns ME as author and the ProteinMPNN paper. More... | |
Static Private Member Functions | |
| static std::string | get_selection_sequence (std::string const &pose_sequence, std::map< core::Size, utility::vector1< core::Real >> const &position_map) |
| Get the sequence of the selection. More... | |
Private Attributes | |
| std::string | write_pssm_ |
| The output filename of the pssm. More... | |
| utility::vector1< utility::vector1< core::select::residue_selector::ResidueSelectorCOP > > | tied_pos_rs_ |
| A vector of vectors of residue selectors to specify tied positions for ProteinMPNN. More... | |
| core::select::residue_selector::ResidueSelectorCOP | coord_selector_rs_ |
| A residue selector to specify backbone coordinates to be used as input for ProteinMPNN (default all) More... | |
| core::select::residue_selector::ResidueSelectorCOP | sequence_mask_selector_rs_ |
| A residue selector to mask specific parts of the input sequence for ProteinMPNN. More... | |
| core::select::residue_selector::ResidueSelectorCOP | residue_selector_ = nullptr |
| An optional residue selector to limit the returned probabilities to a selection. More... | |
| bool | deterministic_flag_ = false |
| An optional boolean flag to run in deterministic mode. More... | |
A metric for estimating amino acid probabilities using the ProteinMPNN model.
| protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::ProteinMPNNProbabilitiesMetric | ( | ) |
Constructors ///.
Default constructor
|
default |
Copy constructor (not needed unless you need deep copies)
Copy constructor.
|
overridedefault |
Destructor (important for properly forward-declaring smart-pointer members)
|
overridevirtual |
Metric Methods ///.
Calculate the metric.
Implements core::simple_metrics::PerResidueProbabilitiesMetric.
References clone(), coord_selector_rs_, deterministic_flag_, get_selection_sequence(), core::pose::symmetry::is_symmetric(), core::simple_metrics::PerResidueProbabilitiesMetric::output_sequence_profile(), residue_selector_, protocols::protein_mpnn::ProteinMPNNMover::residue_selectors_to_indices(), core::select::residue_selector::selection_positions(), core::pose::Pose::sequence(), sequence_mask_selector_rs_, core::pose::Pose::size(), core::pose::symmetry::symmetry_info(), tied_pos_rs_, core::pose::Pose::total_residue(), protocols::protein_mpnn::ProteinMPNNMover::validate_residue_selectors(), and write_pssm_.
|
overridevirtual |
Implements core::simple_metrics::PerResidueProbabilitiesMetric.
Referenced by calculate().
| bool protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::deterministic_flag | ( | ) | const |
Get the deterministic_flag mode.
References deterministic_flag_.
Referenced by set_deterministic_flag().
|
staticprivate |
Get the sequence of the selection.
Get the sequence of the selection from a map of positions->logits value.
References core::scoring::pair.
Referenced by calculate().
|
overridevirtual |
Name of the metric.
Implements core::simple_metrics::PerResidueProbabilitiesMetric.
References name_static().
|
overridevirtual |
Name of the class.
Implements core::simple_metrics::PerResidueProbabilitiesMetric.
References name_static().
|
static |
Name of the class for creator.
Referenced by protocols::protein_mpnn::ProteinMPNNProbabilitiesMetricCreator::keyname(), metric(), name(), and provide_xml_schema().
|
overridevirtual |
called by parse_my_tag – should not be used directly
Implements core::simple_metrics::PerResidueProbabilitiesMetric.
References coord_selector_rs_, deterministic_flag_, core::select::residue_selector::get_residue_selector(), residue_selector_, sequence_mask_selector_rs_, set_residue_selector(), tied_pos_rs_, and write_pssm_.
|
overrideprivatevirtual |
This metric is currently unpublished, returns ME as author and the ProteinMPNN paper.
Reimplemented from core::simple_metrics::SimpleMetric.
|
static |
| core::select::residue_selector::ResidueSelectorCOP protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::residue_selector | ( | ) | const |
Get the residue selector.
If this returns nullptr, it means that no residue selector is being used.
References residue_selector_.
| void protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::set_coord_selector_rs | ( | core::select::residue_selector::ResidueSelectorCOP | coord_selector_rs | ) |
Set residues whose coordinates should be passed to ProteinMPNN.
References coord_selector_rs_.
| void protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::set_deterministic_flag | ( | bool | deterministic_flag | ) |
Set to true to run in deterministic mode.
References deterministic_flag(), and deterministic_flag_.
| void protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::set_residue_selector | ( | core::select::residue_selector::ResidueSelectorCOP | selector_in | ) |
Set the residue selector that we'll be using.
Passing nullptr results in no residue selector being used.
References residue_selector_.
Referenced by parse_my_tag().
| void protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::set_sequence_mask_selector_rs | ( | core::select::residue_selector::ResidueSelectorCOP | sequence_mask_selector_rs | ) |
Set residues whose sequence should be masked.
References sequence_mask_selector_rs_.
| void protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::set_tied_pos_rs | ( | utility::vector1< utility::vector1< core::select::residue_selector::ResidueSelectorCOP > > | tied_pos_rs | ) |
Set tied positions. This is a collection of lists, each list containing residue selectors that should be tied.
The first residues of each selector will be tied together, then the second, etc. Each residue selector must have the same number of residues.
References tied_pos_rs_.
|
inline |
Get the output filename of the pssm.
References write_pssm_.
|
private |
A residue selector to specify backbone coordinates to be used as input for ProteinMPNN (default all)
Referenced by calculate(), parse_my_tag(), and set_coord_selector_rs().
|
private |
An optional boolean flag to run in deterministic mode.
Referenced by calculate(), deterministic_flag(), parse_my_tag(), and set_deterministic_flag().
|
private |
An optional residue selector to limit the returned probabilities to a selection.
Referenced by calculate(), parse_my_tag(), residue_selector(), and set_residue_selector().
|
private |
A residue selector to mask specific parts of the input sequence for ProteinMPNN.
Referenced by calculate(), parse_my_tag(), and set_sequence_mask_selector_rs().
|
private |
A vector of vectors of residue selectors to specify tied positions for ProteinMPNN.
Referenced by calculate(), parse_my_tag(), and set_tied_pos_rs().
|
private |
The output filename of the pssm.
Referenced by calculate(), parse_my_tag(), and write_pssm().