Rosetta
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric Class Reference

A metric for estimating amino acid probabilities using the ProteinMPNN model. More...

#include <ProteinMPNNProbabilitiesMetric.hh>

Inheritance diagram for protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric:
Inheritance graph
[legend]

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)
 
PerResidueProbabilitiesMetricoperator= (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)
 
SimpleMetricoperator= (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...
 

Detailed Description

A metric for estimating amino acid probabilities using the ProteinMPNN model.

Constructor & Destructor Documentation

◆ ProteinMPNNProbabilitiesMetric() [1/2]

protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::ProteinMPNNProbabilitiesMetric ( )

Constructors ///.

Default constructor

◆ ProteinMPNNProbabilitiesMetric() [2/2]

protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::ProteinMPNNProbabilitiesMetric ( ProteinMPNNProbabilitiesMetric const &  src)
default

Copy constructor (not needed unless you need deep copies)

Copy constructor.

◆ ~ProteinMPNNProbabilitiesMetric()

protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::~ProteinMPNNProbabilitiesMetric ( )
overridedefault

Destructor (important for properly forward-declaring smart-pointer members)

Member Function Documentation

◆ calculate()

std::map< core::Size, std::map< core::chemical::AA, core::Real > > protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::calculate ( core::pose::Pose const &  pose) const
overridevirtual

◆ clone()

core::simple_metrics::SimpleMetricOP protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::clone ( ) const
overridevirtual

◆ deterministic_flag()

bool protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::deterministic_flag ( ) const

Get the deterministic_flag mode.

References deterministic_flag_.

Referenced by set_deterministic_flag().

◆ get_selection_sequence()

std::string protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::get_selection_sequence ( std::string const &  pose_sequence,
std::map< core::Size, utility::vector1< core::Real >> const &  position_map 
)
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().

◆ metric()

std::string protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::metric ( ) const
overridevirtual

Name of the metric.

Implements core::simple_metrics::PerResidueProbabilitiesMetric.

References name_static().

◆ name()

std::string protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::name ( ) const
overridevirtual

Name of the class.

Implements core::simple_metrics::PerResidueProbabilitiesMetric.

References name_static().

◆ name_static()

std::string protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::name_static ( )
static

◆ parse_my_tag()

void protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::parse_my_tag ( utility::tag::TagCOP  tag,
basic::datacache::DataMap data 
)
overridevirtual

◆ provide_citation_info()

void protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::provide_citation_info ( basic::citation_manager::CitationCollectionList &  citations) const
overrideprivatevirtual

This metric is currently unpublished, returns ME as author and the ProteinMPNN paper.

Reimplemented from core::simple_metrics::SimpleMetric.

◆ provide_xml_schema()

void protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::provide_xml_schema ( utility::tag::XMLSchemaDefinition &  xsd)
static

◆ residue_selector()

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_.

◆ set_coord_selector_rs()

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_.

◆ set_deterministic_flag()

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_.

◆ set_residue_selector()

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().

◆ set_sequence_mask_selector_rs()

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_.

◆ set_tied_pos_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_.

◆ write_pssm()

std::string protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::write_pssm ( ) const
inline

Get the output filename of the pssm.

References write_pssm_.

Member Data Documentation

◆ coord_selector_rs_

core::select::residue_selector::ResidueSelectorCOP protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::coord_selector_rs_
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().

◆ deterministic_flag_

bool protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::deterministic_flag_ = false
private

An optional boolean flag to run in deterministic mode.

Referenced by calculate(), deterministic_flag(), parse_my_tag(), and set_deterministic_flag().

◆ residue_selector_

core::select::residue_selector::ResidueSelectorCOP protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::residue_selector_ = nullptr
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().

◆ sequence_mask_selector_rs_

core::select::residue_selector::ResidueSelectorCOP protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::sequence_mask_selector_rs_
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().

◆ tied_pos_rs_

utility::vector1< utility::vector1< core::select::residue_selector::ResidueSelectorCOP > > protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::tied_pos_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().

◆ write_pssm_

std::string protocols::protein_mpnn::ProteinMPNNProbabilitiesMetric::write_pssm_
private

The output filename of the pssm.

Referenced by calculate(), parse_my_tag(), and write_pssm().


The documentation for this class was generated from the following files: