esm_perplexity

Bindings for protocols::esm_perplexity namespace

class pyrosetta.rosetta.protocols.esm_perplexity.EsmPerplexityTensorflowProtocol

Bases: RosettaTensorflowProtocolBase

Protocol to predict amino acid probabilities using the ESM language model family

Moritz Ertelt (moritz.ertelt.com)

assign(self: pyrosetta.rosetta.protocols.esm_perplexity.EsmPerplexityTensorflowProtocol, : pyrosetta.rosetta.protocols.esm_perplexity.EsmPerplexityTensorflowProtocol) pyrosetta.rosetta.protocols.esm_perplexity.EsmPerplexityTensorflowProtocol

C++: protocols::esm_perplexity::EsmPerplexityTensorflowProtocol::operator=(const class protocols::esm_perplexity::EsmPerplexityTensorflowProtocol &) –> class protocols::esm_perplexity::EsmPerplexityTensorflowProtocol &

auto_download(*args, **kwargs)

Overloaded function.

  1. auto_download(self: pyrosetta.rosetta.protocols.esm_perplexity.EsmPerplexityTensorflowProtocol) -> bool

get auto_download value

C++: protocols::esm_perplexity::EsmPerplexityTensorflowProtocol::auto_download() const –> bool

  1. auto_download(self: pyrosetta.rosetta.protocols.esm_perplexity.EsmPerplexityTensorflowProtocol, setting: bool) -> None

set the auto_download value

C++: protocols::esm_perplexity::EsmPerplexityTensorflowProtocol::auto_download(bool) –> void

clone(self: pyrosetta.rosetta.protocols.esm_perplexity.EsmPerplexityTensorflowProtocol) pyrosetta.rosetta.basic.tensorflow_manager.RosettaTensorflowProtocolBase

Clone operation: make a copy of this object, and return an owning pointer to the copy.

C++: protocols::esm_perplexity::EsmPerplexityTensorflowProtocol::clone() const –> class std::shared_ptr<class basic::tensorflow_manager::RosettaTensorflowProtocolBase>

static download_model_if_not_existing(path_to_model: str, base_url: str, auto_download: bool) None

Downloads model from GitLab if the specified path does not exist or is empty

Directory path where the model should be located

Url of the GitLab where models are stored

Whether to automatically download missing models

C++: protocols::esm_perplexity::EsmPerplexityTensorflowProtocol::download_model_if_not_existing(const std::string &, const std::string &, const bool &) –> void

property model_name_
name(self: pyrosetta.rosetta.protocols.esm_perplexity.EsmPerplexityTensorflowProtocol) str

Get the name of this protocol.

C++: protocols::esm_perplexity::EsmPerplexityTensorflowProtocol::name() const –> std::string

set_defaults(self: pyrosetta.rosetta.protocols.esm_perplexity.EsmPerplexityTensorflowProtocol) None

set default options

C++: protocols::esm_perplexity::EsmPerplexityTensorflowProtocol::set_defaults() –> void

static softmax(logit_map: pyrosetta.rosetta.std.map_unsigned_long_utility_vector1_double_std_allocator_double_t_std_allocator_std_pair_const_unsigned_long_utility_vector1_double_std_allocator_double_t, softmax_map: pyrosetta.rosetta.std.map_unsigned_long_utility_vector1_double_std_allocator_double_t_std_allocator_std_pair_const_unsigned_long_utility_vector1_double_std_allocator_double_t) None

Apply softmax function to logits

A map of logits, where each key represents a residue and its predicted logits

A map of softmax, where each key represents a residue and its predicted probabilities.

C++: protocols::esm_perplexity::EsmPerplexityTensorflowProtocol::softmax(const class std::map<unsigned long, class utility::vector1<double, class std::allocator<double> >, struct std::less<unsigned long>, class std::allocator<struct std::pair<const unsigned long, class utility::vector1<double, class std::allocator<double> > > > > &, class std::map<unsigned long, class utility::vector1<double, class std::allocator<double> >, struct std::less<unsigned long>, class std::allocator<struct std::pair<const unsigned long, class utility::vector1<double, class std::allocator<double> > > > > &) –> void

class pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetric

Bases: PerResidueProbabilitiesMetric

A metric for estimating the amino acid probabilities using the ESM language model family

static add_schema(complex_schema: utility::tag::XMLSchemaComplexTypeGenerator) None

Add options to the schema from this base class.

C++: core::simple_metrics::PerResidueProbabilitiesMetric::add_schema(class std::shared_ptr<class utility::tag::XMLSchemaComplexTypeGenerator>) –> void

apply(*args, **kwargs)

Overloaded function.

  1. apply(self: pyrosetta.rosetta.core.simple_metrics.PerResidueProbabilitiesMetric, pose: pyrosetta.rosetta.core.pose.Pose) -> None

  2. apply(self: pyrosetta.rosetta.core.simple_metrics.PerResidueProbabilitiesMetric, pose: pyrosetta.rosetta.core.pose.Pose, prefix: str) -> None

  3. apply(self: pyrosetta.rosetta.core.simple_metrics.PerResidueProbabilitiesMetric, pose: pyrosetta.rosetta.core.pose.Pose, prefix: str, suffix: str) -> None

  4. apply(self: pyrosetta.rosetta.core.simple_metrics.PerResidueProbabilitiesMetric, pose: pyrosetta.rosetta.core.pose.Pose, prefix: str, suffix: str, override_existing_data: bool) -> None

  5. apply(self: pyrosetta.rosetta.core.simple_metrics.PerResidueProbabilitiesMetric, out_label: str, pose: pyrosetta.rosetta.core.pose.Pose) -> None

  6. apply(self: pyrosetta.rosetta.core.simple_metrics.PerResidueProbabilitiesMetric, out_label: str, pose: pyrosetta.rosetta.core.pose.Pose, override_existing_data: bool) -> None

Calculate the metric and add it to the pose as a score.

labeled as out_label

Score is added to the SimpleMetricData cache in the pose

A ReferencePose is created with out_label as a name for further access. Data is output to the final scorefile.

C++: core::simple_metrics::PerResidueProbabilitiesMetric::apply(const std::string &, class core::pose::Pose &, bool) const –> void

assign(self: pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetric, : pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetric) pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetric

C++: protocols::esm_perplexity::PerResidueEsmProbabilitiesMetric::operator=(const class protocols::esm_perplexity::PerResidueEsmProbabilitiesMetric &) –> class protocols::esm_perplexity::PerResidueEsmProbabilitiesMetric &

cached_calculate(*args, **kwargs)

Overloaded function.

  1. cached_calculate(self: pyrosetta.rosetta.core.simple_metrics.PerResidueProbabilitiesMetric, pose: pyrosetta.rosetta.core.pose.Pose, use_cache: bool) -> pyrosetta.rosetta.std.map_unsigned_long_std_map_core_chemical_AA_double_std_less_core_chemical_AA_std_allocator_std_pair_const_core_chemical_AA_double_t_std_allocator_std_pair_const_unsigned_long_std_map_core_chemical_AA_double_std_less_core_chemical_AA_std_allocator_std_pair_const_core_chemical_AA_double_t

  2. cached_calculate(self: pyrosetta.rosetta.core.simple_metrics.PerResidueProbabilitiesMetric, pose: pyrosetta.rosetta.core.pose.Pose, use_cache: bool, prefix: str) -> pyrosetta.rosetta.std.map_unsigned_long_std_map_core_chemical_AA_double_std_less_core_chemical_AA_std_allocator_std_pair_const_core_chemical_AA_double_t_std_allocator_std_pair_const_unsigned_long_std_map_core_chemical_AA_double_std_less_core_chemical_AA_std_allocator_std_pair_const_core_chemical_AA_double_t

  3. cached_calculate(self: pyrosetta.rosetta.core.simple_metrics.PerResidueProbabilitiesMetric, pose: pyrosetta.rosetta.core.pose.Pose, use_cache: bool, prefix: str, suffix: str) -> pyrosetta.rosetta.std.map_unsigned_long_std_map_core_chemical_AA_double_std_less_core_chemical_AA_std_allocator_std_pair_const_core_chemical_AA_double_t_std_allocator_std_pair_const_unsigned_long_std_map_core_chemical_AA_double_std_less_core_chemical_AA_std_allocator_std_pair_const_core_chemical_AA_double_t

  4. cached_calculate(self: pyrosetta.rosetta.core.simple_metrics.PerResidueProbabilitiesMetric, pose: pyrosetta.rosetta.core.pose.Pose, use_cache: bool, prefix: str, suffix: str, fail_on_missing_cache: bool) -> pyrosetta.rosetta.std.map_unsigned_long_std_map_core_chemical_AA_double_std_less_core_chemical_AA_std_allocator_std_pair_const_core_chemical_AA_double_t_std_allocator_std_pair_const_unsigned_long_std_map_core_chemical_AA_double_std_less_core_chemical_AA_std_allocator_std_pair_const_core_chemical_AA_double_t

  5. cached_calculate(self: pyrosetta.rosetta.core.simple_metrics.PerResidueProbabilitiesMetric, pose: pyrosetta.rosetta.core.pose.Pose, use_cache: bool, prefix: str, suffix: str, fail_on_missing_cache: bool, use_ref_pose_for_cache: bool) -> pyrosetta.rosetta.std.map_unsigned_long_std_map_core_chemical_AA_double_std_less_core_chemical_AA_std_allocator_std_pair_const_core_chemical_AA_double_t_std_allocator_std_pair_const_unsigned_long_std_map_core_chemical_AA_double_std_less_core_chemical_AA_std_allocator_std_pair_const_core_chemical_AA_double_t

Grab the data from the pose if it exists or calculate the metric

If use_cache is true, we will attempt to pull the data from the pose. If fail_on_missing_cache is true, we will fail, otherwise, we will calculate the metric.

This function is meant to support caching metrics, so values do not need to be calculated twice,

for example in SimpleMetricFilter/Features or code-wise where data takes a while to calculate and can be reused.

If we cached the data, we have created a ref-pose and can match the current resnums with our refpose resnums

using the use_ref_pose_for_cache option. This allows us to delete residues and still retain the given data to match.

C++: core::simple_metrics::PerResidueProbabilitiesMetric::cached_calculate(const class core::pose::Pose &, bool, const std::string &, const std::string &, bool, bool) const –> class std::map<unsigned long, class std::map<enum core::chemical::AA, double, struct std::less<enum core::chemical::AA>, class std::allocator<struct std::pair<const enum core::chemical::AA, double> > >, struct std::less<unsigned long>, class std::allocator<struct std::pair<const unsigned long, class std::map<enum core::chemical::AA, double, struct std::less<enum core::chemical::AA>, class std::allocator<struct std::pair<const enum core::chemical::AA, double> > > > > >

calculate(self: pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetric, pose: pyrosetta.rosetta.core.pose.Pose) pyrosetta.rosetta.std.map_unsigned_long_std_map_core_chemical_AA_double_std_less_core_chemical_AA_std_allocator_std_pair_const_core_chemical_AA_double_t_std_allocator_std_pair_const_unsigned_long_std_map_core_chemical_AA_double_std_less_core_chemical_AA_std_allocator_std_pair_const_core_chemical_AA_double_t

Calculate the metric.

C++: protocols::esm_perplexity::PerResidueEsmProbabilitiesMetric::calculate(const class core::pose::Pose &) const –> class std::map<unsigned long, class std::map<enum core::chemical::AA, double, struct std::less<enum core::chemical::AA>, class std::allocator<struct std::pair<const enum core::chemical::AA, double> > >, struct std::less<unsigned long>, class std::allocator<struct std::pair<const unsigned long, class std::map<enum core::chemical::AA, double, struct std::less<enum core::chemical::AA>, class std::allocator<struct std::pair<const enum core::chemical::AA, double> > > > > >

clone(self: pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetric) pyrosetta.rosetta.core.simple_metrics.SimpleMetric

C++: protocols::esm_perplexity::PerResidueEsmProbabilitiesMetric::clone() const –> class std::shared_ptr<class core::simple_metrics::SimpleMetric>

static complex_type_generator_for_simple_metric(: utility::tag::XMLSchemaDefinition) utility::tag::XMLSchemaComplexTypeGenerator

C++: core::simple_metrics::SimpleMetric::complex_type_generator_for_simple_metric(class utility::tag::XMLSchemaDefinition &) –> class std::shared_ptr<class utility::tag::XMLSchemaComplexTypeGenerator>

get_custom_type(self: pyrosetta.rosetta.core.simple_metrics.SimpleMetric) str

Output data name will be prefix+custom_type+type+suffix

C++: core::simple_metrics::SimpleMetric::get_custom_type() const –> std::string

get_final_sm_type(self: pyrosetta.rosetta.core.simple_metrics.SimpleMetric) str

Get the final name of this metric including its simple_metric_type_ name and any set custom type.

C++: core::simple_metrics::SimpleMetric::get_final_sm_type() const –> std::string

get_metric_names(self: pyrosetta.rosetta.core.simple_metrics.PerResidueProbabilitiesMetric) pyrosetta.rosetta.utility.vector1_std_string

Get the submetric names that this Metric will calculate

C++: core::simple_metrics::PerResidueProbabilitiesMetric::get_metric_names() const –> class utility::vector1<std::string, class std::allocator<std::string > >

get_selector(self: pyrosetta.rosetta.core.simple_metrics.PerResidueProbabilitiesMetric) pyrosetta.rosetta.core.select.residue_selector.ResidueSelector

Get the set residue selector of this class.

C++: core::simple_metrics::PerResidueProbabilitiesMetric::get_selector() const –> class std::shared_ptr<const class core::select::residue_selector::ResidueSelector>

metric(self: pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetric) str

Name of the metric

C++: protocols::esm_perplexity::PerResidueEsmProbabilitiesMetric::metric() const –> std::string

model(self: pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetric) str

Get the ESM model that will be used for prediction.

C++: protocols::esm_perplexity::PerResidueEsmProbabilitiesMetric::model() const –> std::string

name(self: pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetric) str

Name of the class

C++: protocols::esm_perplexity::PerResidueEsmProbabilitiesMetric::name() const –> std::string

static name_static() str

Name of the class for creator.

C++: protocols::esm_perplexity::PerResidueEsmProbabilitiesMetric::name_static() –> std::string

static output_sequence_profile(sequence: str, logit_map: pyrosetta.rosetta.std.map_unsigned_long_std_map_core_chemical_AA_double_std_less_core_chemical_AA_std_allocator_std_pair_const_core_chemical_AA_double_t_std_allocator_std_pair_const_unsigned_long_std_map_core_chemical_AA_double_std_less_core_chemical_AA_std_allocator_std_pair_const_core_chemical_AA_double_t, output_filename: str) None

Format the probabilities in psi-blast position-specific-scoring-matrix (PSSM) format and write to file

The sequence of the pose

A map containing the predicted logits for each position

A string defining the name of the output file

C++: core::simple_metrics::PerResidueProbabilitiesMetric::output_sequence_profile(const std::string &, const class std::map<unsigned long, class std::map<enum core::chemical::AA, double, struct std::less<enum core::chemical::AA>, class std::allocator<struct std::pair<const enum core::chemical::AA, double> > >, struct std::less<unsigned long>, class std::allocator<struct std::pair<const unsigned long, class std::map<enum core::chemical::AA, double, struct std::less<enum core::chemical::AA>, class std::allocator<struct std::pair<const enum core::chemical::AA, double> > > > > > &, const std::string &) –> void

parse_base_tag(self: pyrosetta.rosetta.core.simple_metrics.SimpleMetric, tag: utility::tag::Tag) None

Parse the base class tag. Keep required interface for parse_my_tag.

C++: core::simple_metrics::SimpleMetric::parse_base_tag(class std::shared_ptr<const class utility::tag::Tag>) –> void

parse_my_tag(self: pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetric, tag: pyrosetta.rosetta.utility.tag.Tag, data: pyrosetta.rosetta.basic.datacache.DataMap) None

called by parse_my_tag – should not be used directly

C++: protocols::esm_perplexity::PerResidueEsmProbabilitiesMetric::parse_my_tag(class std::shared_ptr<const class utility::tag::Tag>, class basic::datacache::DataMap &) –> void

parse_per_residue_tag(self: pyrosetta.rosetta.core.simple_metrics.PerResidueProbabilitiesMetric, tag: pyrosetta.rosetta.utility.tag.Tag, data: pyrosetta.rosetta.basic.datacache.DataMap) None

Parse the base class tag. Keep required interface for parse_my_tag.

C++: core::simple_metrics::PerResidueProbabilitiesMetric::parse_per_residue_tag(class std::shared_ptr<const class utility::tag::Tag>, class basic::datacache::DataMap &) –> void

provide_citation_info(self: pyrosetta.rosetta.core.simple_metrics.SimpleMetric, : pyrosetta.rosetta.basic.citation_manager.CitationCollectionList) None
Provide citations to the passed CitationCollectionList

Subclasses should add the info for themselves and any other classes they use.

The default implementation of this function does nothing. It may be overriden by simple metrics wishing to provide citation information.

C++: core::simple_metrics::SimpleMetric::provide_citation_info(class basic::citation_manager::CitationCollectionList &) const –> void

static provide_xml_schema(xsd: utility::tag::XMLSchemaDefinition) None

C++: protocols::esm_perplexity::PerResidueEsmProbabilitiesMetric::provide_xml_schema(class utility::tag::XMLSchemaDefinition &) –> void

residue_selector(self: pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetric) pyrosetta.rosetta.core.select.residue_selector.ResidueSelector

Get the residue selector.

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

C++: protocols::esm_perplexity::PerResidueEsmProbabilitiesMetric::residue_selector() const –> class std::shared_ptr<const class core::select::residue_selector::ResidueSelector>

set_custom_type(self: pyrosetta.rosetta.core.simple_metrics.SimpleMetric, custom_type: str) None

C++: core::simple_metrics::SimpleMetric::set_custom_type(const std::string &) –> void

set_output_as_pdb_nums(self: pyrosetta.rosetta.core.simple_metrics.PerResidueProbabilitiesMetric, output_as_pdb_nums: bool) None
Set to output in PDB numbering instead of Rosetta during the Apply function,

which adds the data to pose as extra scores.

C++: core::simple_metrics::PerResidueProbabilitiesMetric::set_output_as_pdb_nums(bool) –> void

set_residue_selector(self: pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetric, selector_in: pyrosetta.rosetta.core.select.residue_selector.ResidueSelector) None

Set the residue selector that we’ll be using.

Passing nullptr results in no residue selector being used.

C++: protocols::esm_perplexity::PerResidueEsmProbabilitiesMetric::set_residue_selector(class std::shared_ptr<const class core::select::residue_selector::ResidueSelector>) –> void

set_residue_selector2(self: pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetric, selector: pyrosetta.rosetta.core.select.residue_selector.ResidueSelector) None

A second optional residue selector for attention masking

C++: protocols::esm_perplexity::PerResidueEsmProbabilitiesMetric::set_residue_selector2(class std::shared_ptr<const class core::select::residue_selector::ResidueSelector>) –> void

simple_metric_type(self: pyrosetta.rosetta.core.simple_metrics.SimpleMetric) str

C++: core::simple_metrics::SimpleMetric::simple_metric_type() const –> std::string

write_pssm(self: pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetric) str

Get the output filename of the pssm

C++: protocols::esm_perplexity::PerResidueEsmProbabilitiesMetric::write_pssm() const –> std::string

class pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetricCreator

Bases: SimpleMetricCreator

assign(self: pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetricCreator, : pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetricCreator) pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetricCreator

C++: protocols::esm_perplexity::PerResidueEsmProbabilitiesMetricCreator::operator=(const class protocols::esm_perplexity::PerResidueEsmProbabilitiesMetricCreator &) –> class protocols::esm_perplexity::PerResidueEsmProbabilitiesMetricCreator &

create_simple_metric(self: pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetricCreator) pyrosetta.rosetta.core.simple_metrics.SimpleMetric

Instantiate a particular SimpleMetric

C++: protocols::esm_perplexity::PerResidueEsmProbabilitiesMetricCreator::create_simple_metric() const –> class std::shared_ptr<class core::simple_metrics::SimpleMetric>

keyname(self: pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetricCreator) str

Return a string that will be used to instantiate the particular SimpleMetric

C++: protocols::esm_perplexity::PerResidueEsmProbabilitiesMetricCreator::keyname() const –> std::string

provide_xml_schema(self: pyrosetta.rosetta.protocols.esm_perplexity.PerResidueEsmProbabilitiesMetricCreator, : utility::tag::XMLSchemaDefinition) None

C++: protocols::esm_perplexity::PerResidueEsmProbabilitiesMetricCreator::provide_xml_schema(class utility::tag::XMLSchemaDefinition &) const –> void

class pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetric

Bases: RealMetric

A metric for calculating the (pseudo-)perplexity of a sequence

apply(*args, **kwargs)

Overloaded function.

  1. apply(self: pyrosetta.rosetta.core.simple_metrics.RealMetric, pose: pyrosetta.rosetta.core.pose.Pose) -> None

  2. apply(self: pyrosetta.rosetta.core.simple_metrics.RealMetric, pose: pyrosetta.rosetta.core.pose.Pose, prefix: str) -> None

  3. apply(self: pyrosetta.rosetta.core.simple_metrics.RealMetric, pose: pyrosetta.rosetta.core.pose.Pose, prefix: str, suffix: str) -> None

  4. apply(self: pyrosetta.rosetta.core.simple_metrics.RealMetric, pose: pyrosetta.rosetta.core.pose.Pose, prefix: str, suffix: str, override_existing_data: bool) -> None

  5. apply(self: pyrosetta.rosetta.core.simple_metrics.RealMetric, out_label: str, pose: pyrosetta.rosetta.core.pose.Pose) -> None

  6. apply(self: pyrosetta.rosetta.core.simple_metrics.RealMetric, out_label: str, pose: pyrosetta.rosetta.core.pose.Pose, override_existing_data: bool) -> None

Calculate the metric and add it to the pose as a score.

labeled as out_label.

Score is added to the SimpleMetricData cache

Data is output into the final score file, but can be accessed if needed through the cache.

C++: core::simple_metrics::RealMetric::apply(const std::string &, class core::pose::Pose &, bool) const –> void

assign(self: pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetric, : pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetric) pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetric

C++: protocols::esm_perplexity::PseudoPerplexityMetric::operator=(const class protocols::esm_perplexity::PseudoPerplexityMetric &) –> class protocols::esm_perplexity::PseudoPerplexityMetric &

property cache_prefix_
property cache_suffix_
cached_calculate(*args, **kwargs)

Overloaded function.

  1. cached_calculate(self: pyrosetta.rosetta.core.simple_metrics.RealMetric, pose: pyrosetta.rosetta.core.pose.Pose, use_cache: bool) -> float

  2. cached_calculate(self: pyrosetta.rosetta.core.simple_metrics.RealMetric, pose: pyrosetta.rosetta.core.pose.Pose, use_cache: bool, prefix: str) -> float

  3. cached_calculate(self: pyrosetta.rosetta.core.simple_metrics.RealMetric, pose: pyrosetta.rosetta.core.pose.Pose, use_cache: bool, prefix: str, suffix: str) -> float

  4. cached_calculate(self: pyrosetta.rosetta.core.simple_metrics.RealMetric, pose: pyrosetta.rosetta.core.pose.Pose, use_cache: bool, prefix: str, suffix: str, fail_on_missing_cache: bool) -> float

Grab the data from the pose if it exists or calculate the metric

If use_cache is true, we will attempt to pull the data from the pose. If fail_on_missing_cache is true, we will fail, otherwise, we will calculate the metric.

This function is meant to support caching metrics, so values do not need to be calculated twice,

for example in SimpleMetricFilter/Features or code-wise where data takes a while to calculate and can be reused.

C++: core::simple_metrics::RealMetric::cached_calculate(const class core::pose::Pose &, bool, std::string, std::string, bool) const –> double

calculate(self: pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetric, pose: pyrosetta.rosetta.core.pose.Pose) float

Calculate the metric.

C++: protocols::esm_perplexity::PseudoPerplexityMetric::calculate(const class core::pose::Pose &) const –> double

clone(self: pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetric) pyrosetta.rosetta.core.simple_metrics.SimpleMetric

C++: protocols::esm_perplexity::PseudoPerplexityMetric::clone() const –> class std::shared_ptr<class core::simple_metrics::SimpleMetric>

static complex_type_generator_for_simple_metric(: utility::tag::XMLSchemaDefinition) utility::tag::XMLSchemaComplexTypeGenerator

C++: core::simple_metrics::SimpleMetric::complex_type_generator_for_simple_metric(class utility::tag::XMLSchemaDefinition &) –> class std::shared_ptr<class utility::tag::XMLSchemaComplexTypeGenerator>

static compute_perplexity(pose: pyrosetta.rosetta.core.pose.Pose, values: pyrosetta.rosetta.std.map_unsigned_long_std_map_core_chemical_AA_double_std_less_core_chemical_AA_std_allocator_std_pair_const_core_chemical_AA_double_t_std_allocator_std_pair_const_unsigned_long_std_map_core_chemical_AA_double_std_less_core_chemical_AA_std_allocator_std_pair_const_core_chemical_AA_double_t) float

Function to return the (pseudo-)perplexity from a map of probabilities

Takes a map of amino acid probabilities, gets the amino acid present in the pose, add the logarithm

of its probability to a sum and then returns the exp of the negative ratio of this sum divided by the total length.

The pose used to refer which core::chemical::AA types are actually present

The resulting values of a PerResidueProbabilitiesMetric

A core::Real value representing the pseud-perplexity

C++: protocols::esm_perplexity::PseudoPerplexityMetric::compute_perplexity(const class core::pose::Pose &, const class std::map<unsigned long, class std::map<enum core::chemical::AA, double, struct std::less<enum core::chemical::AA>, class std::allocator<struct std::pair<const enum core::chemical::AA, double> > >, struct std::less<unsigned long>, class std::allocator<struct std::pair<const unsigned long, class std::map<enum core::chemical::AA, double, struct std::less<enum core::chemical::AA>, class std::allocator<struct std::pair<const enum core::chemical::AA, double> > > > > > &) –> double

property fail_on_missing_cache_
get_custom_type(self: pyrosetta.rosetta.core.simple_metrics.SimpleMetric) str

Output data name will be prefix+custom_type+type+suffix

C++: core::simple_metrics::SimpleMetric::get_custom_type() const –> std::string

get_final_sm_type(self: pyrosetta.rosetta.core.simple_metrics.SimpleMetric) str

Get the final name of this metric including its simple_metric_type_ name and any set custom type.

C++: core::simple_metrics::SimpleMetric::get_final_sm_type() const –> std::string

get_metric_names(self: pyrosetta.rosetta.core.simple_metrics.RealMetric) pyrosetta.rosetta.utility.vector1_std_string

Get the metric name(s) that this Metric will calculate

C++: core::simple_metrics::RealMetric::get_metric_names() const –> class utility::vector1<std::string, class std::allocator<std::string > >

metric(self: pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetric) str

Name of the metric

C++: protocols::esm_perplexity::PseudoPerplexityMetric::metric() const –> std::string

property metric_
name(self: pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetric) str

Name of the class

C++: protocols::esm_perplexity::PseudoPerplexityMetric::name() const –> std::string

static name_static() str

Name of the class for creator.

C++: protocols::esm_perplexity::PseudoPerplexityMetric::name_static() –> std::string

parse_base_tag(self: pyrosetta.rosetta.core.simple_metrics.SimpleMetric, tag: utility::tag::Tag) None

Parse the base class tag. Keep required interface for parse_my_tag.

C++: core::simple_metrics::SimpleMetric::parse_base_tag(class std::shared_ptr<const class utility::tag::Tag>) –> void

parse_my_tag(self: pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetric, tag: pyrosetta.rosetta.utility.tag.Tag, data: pyrosetta.rosetta.basic.datacache.DataMap) None

called by parse_my_tag – should not be used directly

C++: protocols::esm_perplexity::PseudoPerplexityMetric::parse_my_tag(class std::shared_ptr<const class utility::tag::Tag>, class basic::datacache::DataMap &) –> void

provide_citation_info(self: pyrosetta.rosetta.core.simple_metrics.SimpleMetric, : pyrosetta.rosetta.basic.citation_manager.CitationCollectionList) None
Provide citations to the passed CitationCollectionList

Subclasses should add the info for themselves and any other classes they use.

The default implementation of this function does nothing. It may be overriden by simple metrics wishing to provide citation information.

C++: core::simple_metrics::SimpleMetric::provide_citation_info(class basic::citation_manager::CitationCollectionList &) const –> void

static provide_xml_schema(xsd: utility::tag::XMLSchemaDefinition) None

C++: protocols::esm_perplexity::PseudoPerplexityMetric::provide_xml_schema(class utility::tag::XMLSchemaDefinition &) –> void

set_custom_type(self: pyrosetta.rosetta.core.simple_metrics.SimpleMetric, custom_type: str) None

C++: core::simple_metrics::SimpleMetric::set_custom_type(const std::string &) –> void

set_fail_on_missing_cache(self: pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetric, fail: bool) None
If use_cache is set to false, do we fail if no data is found in the pose?

Default True

C++: protocols::esm_perplexity::PseudoPerplexityMetric::set_fail_on_missing_cache(bool) –> void

set_metric(self: pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetric, metric: pyrosetta.rosetta.core.simple_metrics.PerResidueProbabilitiesMetric) None

Set the PerResidueProbabilitiesMetric that will be used to calculate the pseudo-perplexity.

C++: protocols::esm_perplexity::PseudoPerplexityMetric::set_metric(class std::shared_ptr<const class core::simple_metrics::PerResidueProbabilitiesMetric>) –> void

set_use_cached_data(*args, **kwargs)

Overloaded function.

  1. set_use_cached_data(self: pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetric, use_cache: bool) -> None

  2. set_use_cached_data(self: pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetric, use_cache: bool, prefix: str) -> None

  3. set_use_cached_data(self: pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetric, use_cache: bool, prefix: str, suffix: str) -> None

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.

C++: protocols::esm_perplexity::PseudoPerplexityMetric::set_use_cached_data(bool, const std::string &, const std::string &) –> void

simple_metric_type(self: pyrosetta.rosetta.core.simple_metrics.SimpleMetric) str

C++: core::simple_metrics::SimpleMetric::simple_metric_type() const –> std::string

property use_cache_
class pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetricCreator

Bases: SimpleMetricCreator

assign(self: pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetricCreator, : pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetricCreator) pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetricCreator

C++: protocols::esm_perplexity::PseudoPerplexityMetricCreator::operator=(const class protocols::esm_perplexity::PseudoPerplexityMetricCreator &) –> class protocols::esm_perplexity::PseudoPerplexityMetricCreator &

create_simple_metric(self: pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetricCreator) pyrosetta.rosetta.core.simple_metrics.SimpleMetric

Instantiate a particular SimpleMetric

C++: protocols::esm_perplexity::PseudoPerplexityMetricCreator::create_simple_metric() const –> class std::shared_ptr<class core::simple_metrics::SimpleMetric>

keyname(self: pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetricCreator) str

Return a string that will be used to instantiate the particular SimpleMetric

C++: protocols::esm_perplexity::PseudoPerplexityMetricCreator::keyname() const –> std::string

provide_xml_schema(self: pyrosetta.rosetta.protocols.esm_perplexity.PseudoPerplexityMetricCreator, : utility::tag::XMLSchemaDefinition) None

C++: protocols::esm_perplexity::PseudoPerplexityMetricCreator::provide_xml_schema(class utility::tag::XMLSchemaDefinition &) const –> void