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

A PerResidueProbabilitiesMetric that stores amino acid probabilities predicted by the MIF-ST model. More...

#include <MIFSTProbabilitiesMetric.hh>

Inheritance diagram for protocols::inverse_folding::MIFSTProbabilitiesMetric:
Inheritance graph
[legend]

Public Member Functions

 MIFSTProbabilitiesMetric ()
 Constructors ///. More...
 
 ~MIFSTProbabilitiesMetric () override
 Destructor (important for properly forward-declaring smart-pointer members) More...
 
void set_residue_selector (core::select::residue_selector::ResidueSelectorCOP selector_in)
 Metric Methods ///. More...
 
core::select::residue_selector::ResidueSelectorCOP residue_selector () const
 Get the residue selector. More...
 
void set_feature_selector (core::select::residue_selector::ResidueSelectorCOP selector)
 A second optional residue selector for feature selection. More...
 
void set_multirun (bool multirun)
 set the multirun option More...
 
void set_use_gpu (bool use_gpu)
 set the use_gpu option More...
 
std::map< core::Size, std::map< core::chemical::AA, core::Real > > calculate (core::pose::Pose const &pose) const override
 Calculate the metric. This map is Rosetta Resnum->(AA, value) and includes only those residues selected. More...
 
std::string name () const override
 Name of the class. More...
 
std::string metric () const override
 Name of the metric. More...
 
void provide_citation_info (basic::citation_manager::CitationCollectionList &) const override
 This simple metric is unpublished. It returns Moritz Ertelt as its author. 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
 
- 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 Attributes

core::select::residue_selector::ResidueSelectorCOP residue_selector_ = nullptr
 An optional residue selector. More...
 
core::select::residue_selector::ResidueSelectorCOP selector_two_ = nullptr
 Residue selector for attention masking. More...
 
bool multirun_ = true
 whether to run inference on all residues at once, or one-by-one More...
 
bool use_gpu_ = false
 whether to run inference on the GPU (if one is available) More...
 

Detailed Description

A PerResidueProbabilitiesMetric that stores amino acid probabilities predicted by the MIF-ST model.

Constructor & Destructor Documentation

◆ MIFSTProbabilitiesMetric()

protocols::inverse_folding::MIFSTProbabilitiesMetric::MIFSTProbabilitiesMetric ( )

Constructors ///.

Default constructor

◆ ~MIFSTProbabilitiesMetric()

protocols::inverse_folding::MIFSTProbabilitiesMetric::~MIFSTProbabilitiesMetric ( )
override

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::inverse_folding::MIFSTProbabilitiesMetric::calculate ( core::pose::Pose const &  pose) const
overridevirtual

Calculate the metric. This map is Rosetta Resnum->(AA, value) and includes only those residues selected.

Return by value as this function can not STORE the result, it only calculates. Store the result in the pose by using the apply method, which calls this method and stores the result in the pose as ExtraScoreValues.

Implements core::simple_metrics::PerResidueProbabilitiesMetric.

References multirun_, residue_selector_, selector_two_, core::pose::Pose::total_residue(), and use_gpu_.

◆ clone()

core::simple_metrics::SimpleMetricOP protocols::inverse_folding::MIFSTProbabilitiesMetric::clone ( ) const
overridevirtual

◆ metric()

std::string protocols::inverse_folding::MIFSTProbabilitiesMetric::metric ( ) const
overridevirtual

Name of the metric.

Implements core::simple_metrics::PerResidueProbabilitiesMetric.

◆ name()

std::string protocols::inverse_folding::MIFSTProbabilitiesMetric::name ( ) const
overridevirtual

Name of the class.

Implements core::simple_metrics::PerResidueProbabilitiesMetric.

References name_static().

◆ name_static()

std::string protocols::inverse_folding::MIFSTProbabilitiesMetric::name_static ( )
static

◆ parse_my_tag()

void protocols::inverse_folding::MIFSTProbabilitiesMetric::parse_my_tag ( utility::tag::TagCOP  tag,
basic::datacache::DataMap data 
)
overridevirtual

◆ provide_citation_info()

void protocols::inverse_folding::MIFSTProbabilitiesMetric::provide_citation_info ( basic::citation_manager::CitationCollectionList &  citations) const
overridevirtual

This simple metric is unpublished. It returns Moritz Ertelt as its author.

Reimplemented from core::simple_metrics::SimpleMetric.

◆ provide_xml_schema()

void protocols::inverse_folding::MIFSTProbabilitiesMetric::provide_xml_schema ( utility::tag::XMLSchemaDefinition &  xsd)
static

◆ residue_selector()

core::select::residue_selector::ResidueSelectorCOP protocols::inverse_folding::MIFSTProbabilitiesMetric::residue_selector ( ) const

Get the residue selector.

If this returns nullptr, it means that no residue selector is being used.

References residue_selector_.

◆ set_feature_selector()

void protocols::inverse_folding::MIFSTProbabilitiesMetric::set_feature_selector ( core::select::residue_selector::ResidueSelectorCOP  selector)

A second optional residue selector for feature selection.

set the optional residue selector for feature selection

References selector_two_.

Referenced by parse_my_tag().

◆ set_multirun()

void protocols::inverse_folding::MIFSTProbabilitiesMetric::set_multirun ( bool  multirun)

set the multirun option

References multirun_.

Referenced by parse_my_tag().

◆ set_residue_selector()

void protocols::inverse_folding::MIFSTProbabilitiesMetric::set_residue_selector ( core::select::residue_selector::ResidueSelectorCOP  selector_in)

Metric Methods ///.

Set the residue selector that we'll be using.

Defined in RealMetric:

Calculate the metric and add it to the pose as a score. labeled as prefix+metric+suffix.

Score is added through setExtraScorePose and is output into the score tables/file at pose output.

Set the residue selector that we'll be using.

Passing nullptr results in no residue selector being used.

Passing nullptr results in no residue selector being used.

References residue_selector_.

Referenced by parse_my_tag().

◆ set_use_gpu()

void protocols::inverse_folding::MIFSTProbabilitiesMetric::set_use_gpu ( bool  use_gpu)

set the use_gpu option

set the gpu option

References use_gpu_.

Referenced by parse_my_tag().

Member Data Documentation

◆ multirun_

bool protocols::inverse_folding::MIFSTProbabilitiesMetric::multirun_ = true
private

whether to run inference on all residues at once, or one-by-one

Referenced by calculate(), and set_multirun().

◆ residue_selector_

core::select::residue_selector::ResidueSelectorCOP protocols::inverse_folding::MIFSTProbabilitiesMetric::residue_selector_ = nullptr
private

An optional residue selector.

Referenced by calculate(), residue_selector(), and set_residue_selector().

◆ selector_two_

core::select::residue_selector::ResidueSelectorCOP protocols::inverse_folding::MIFSTProbabilitiesMetric::selector_two_ = nullptr
private

Residue selector for attention masking.

Referenced by calculate(), and set_feature_selector().

◆ use_gpu_

bool protocols::inverse_folding::MIFSTProbabilitiesMetric::use_gpu_ = false
private

whether to run inference on the GPU (if one is available)

Referenced by calculate(), and set_use_gpu().


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