Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
protocols::features::SimpleMetricFeatures Class Reference

#include <SimpleMetricFeatures.hh>

Inheritance diagram for protocols::features::SimpleMetricFeatures:
Inheritance graph
[legend]

Public Member Functions

 SimpleMetricFeatures ()
 
 SimpleMetricFeatures (utility::vector1< core::simple_metrics::SimpleMetricCOP > metrics)
 
utility::vector1< std::string > features_reporter_dependencies () const override
 return string with class name More...
 
void write_schema_to_db (utility::sql_database::sessionOP db_session) const override
 generate the table schemas and write them to the database More...
 
void add_simple_metric (core::simple_metrics::SimpleMetricCOP metric)
 Add a simple_metric. More...
 
void set_use_cached_data (bool use_cache)
 Set this FeaturesReporter to use cached data from the pose matching the metric if possible. Default false. More...
 
void set_fail_on_missing_cache (bool fail_on_missing)
 If use_cache is set to false, do we fail if no data is found in the pose? Default True. More...
 
void set_simple_metrics (utility::vector1< core::simple_metrics::SimpleMetricCOP > metrics)
 Set the simple metrics we will run. More...
 
void set_prefix_suffix (std::string prefix="", std::string suffix="")
 Set extra columns, prefix and suffix, for each data added to the database. Used for multiple runs of the features. Also used for matching cached data from the pose. More...
 
void set_table_name (std::string="simple_metrics")
 
void parse_my_tag (utility::tag::TagCOP tag, basic::datacache::DataMap &data) override
 
core::Size report_features (core::pose::Pose const &pose, utility::vector1< bool > const &relevant_residues, StructureID struct_id, utility::sql_database::sessionOP db_session) override
 collect all the feature data for the pose More...
 
std::string type_name () const override
 
- Public Member Functions inherited from protocols::features::FeaturesReporter
 FeaturesReporter ()
 
 ~FeaturesReporter () override
 Automatically generated virtual destructor for class deriving directly from VirtualBase. More...
 
virtual std::string schema () const
 return sql statements that sets up the appropriate tables to contain the features. This should be removed once everything has been moved to the schema generator More...
 
core::Size report_features (core::pose::Pose const &, StructureID, utility::sql_database::sessionOP)
 collect all the feature data for the pose. More...
 
virtual void load_into_pose (utility::sql_database::sessionOP, StructureID, core::pose::Pose &)
 
virtual void delete_record (StructureID, utility::sql_database::sessionOP)
 
void set_relevant_residues_mode (RelevantResiduesMode::T setting)
 
RelevantResiduesMode::T get_relevant_residues_mode () const
 
bool check_relevant_residues (utility::vector1< bool > const &relevant_residues, core::Size res1) const
 
bool check_relevant_residues (utility::vector1< bool > const &relevant_residues, core::Size res1, core::Size res2) const
 
bool check_relevant_residues_range (utility::vector1< bool > const &relevant_residues, core::Size res1, core::Size res2) const
 
bool check_relevant_residues (utility::vector1< bool > const &relevant_residues, utility::vector1< core::Size > const &residues) const
 

Static Public Member Functions

static std::string class_name ()
 
static void provide_xml_schema (utility::tag::XMLSchemaDefinition &xsd)
 

Private Member Functions

void write_general_schema_to_db (utility::sql_database::sessionOP db_session) const
 
void write_per_residue_schema_to_db (utility::sql_database::sessionOP db_session) const
 
core::Size report_general_features (core::pose::Pose const &pose, utility::vector1< bool > const &relevant_residues, StructureID struct_id, utility::sql_database::sessionOP db_session)
 collect all the feature data for the pose More...
 
core::Size report_per_residue_features (core::pose::Pose const &pose, utility::vector1< bool > const &relevant_residues, StructureID struct_id, utility::sql_database::sessionOP db_session)
 
void write_per_residue_data_row (StructureID struct_id, core::Size resnum, utility::vector1< std::string > const &data_names, std::map< std::string, std::map< core::Size, std::string > > const &string_data, std::map< std::string, std::map< core::Size, core::Real > > const &real_data, utility::sql_database::sessionOP db_session)
 

Private Attributes

utility::vector1
< core::simple_metrics::SimpleMetricCOP
metrics_
 
std::string prefix_ =""
 
std::string suffix_ =""
 
std::string table_name_ ="simple_metrics"
 
bool use_cache_ = false
 
bool fail_on_missing_cache_ = true
 

Additional Inherited Members

- Protected Member Functions inherited from protocols::features::FeaturesReporter
std::string find_tag (core::pose::Pose const &pose) const
 
void delete_records_from_table (std::string const &table_name, StructureID struct_id, utility::sql_database::sessionOP db_session)
 a helper function for deleting data associated with a given structure from feature database WARNING table_name must be sanitized! More...
 
- Protected Attributes inherited from protocols::features::FeaturesReporter
RelevantResiduesMode::T relevant_residues_mode_
 

Constructor & Destructor Documentation

protocols::features::SimpleMetricFeatures::SimpleMetricFeatures ( )
protocols::features::SimpleMetricFeatures::SimpleMetricFeatures ( utility::vector1< core::simple_metrics::SimpleMetricCOP metrics)

References set_simple_metrics().

Member Function Documentation

void protocols::features::SimpleMetricFeatures::add_simple_metric ( core::simple_metrics::SimpleMetricCOP  metric)

Add a simple_metric.

References metrics_.

std::string protocols::features::SimpleMetricFeatures::class_name ( )
static
utility::vector1< std::string > protocols::features::SimpleMetricFeatures::features_reporter_dependencies ( ) const
overridevirtual

return string with class name

return the set of features reporters that are required to also already be extracted by the time this one is used.

Reimplemented from protocols::features::FeaturesReporter.

void protocols::features::SimpleMetricFeatures::parse_my_tag ( utility::tag::TagCOP  tag,
basic::datacache::DataMap &  data 
)
overridevirtual
void protocols::features::SimpleMetricFeatures::provide_xml_schema ( utility::tag::XMLSchemaDefinition &  xsd)
static
core::Size protocols::features::SimpleMetricFeatures::report_features ( core::pose::Pose const &  pose,
utility::vector1< bool > const &  relevant_residues,
StructureID  struct_id,
utility::sql_database::sessionOP  db_session 
)
overridevirtual

collect all the feature data for the pose

Implements protocols::features::FeaturesReporter.

References report_general_features(), and report_per_residue_features().

core::Size protocols::features::SimpleMetricFeatures::report_general_features ( core::pose::Pose const &  pose,
utility::vector1< bool > const &  relevant_residues,
StructureID  struct_id,
utility::sql_database::sessionOP  db_session 
)
private
core::Size protocols::features::SimpleMetricFeatures::report_per_residue_features ( core::pose::Pose const &  pose,
utility::vector1< bool > const &  relevant_residues,
StructureID  struct_id,
utility::sql_database::sessionOP  db_session 
)
private
void protocols::features::SimpleMetricFeatures::set_fail_on_missing_cache ( bool  fail_on_missing)

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::features::SimpleMetricFeatures::set_prefix_suffix ( std::string  prefix = "",
std::string  suffix = "" 
)

Set extra columns, prefix and suffix, for each data added to the database. Used for multiple runs of the features. Also used for matching cached data from the pose.

References prefix_, and suffix_.

Referenced by parse_my_tag().

void protocols::features::SimpleMetricFeatures::set_simple_metrics ( utility::vector1< core::simple_metrics::SimpleMetricCOP metrics)

Set the simple metrics we will run.

References metrics_.

Referenced by parse_my_tag(), and SimpleMetricFeatures().

void protocols::features::SimpleMetricFeatures::set_table_name ( std::string  table_name = "simple_metrics")

References table_name_.

Referenced by parse_my_tag().

void protocols::features::SimpleMetricFeatures::set_use_cached_data ( bool  use_cache)

Set this FeaturesReporter to use cached data from the pose matching the metric if possible. Default false.

See Also: set_prefix_suffix() for matching on prefix/suffix set for the metric.

References use_cache_.

Referenced by parse_my_tag().

std::string protocols::features::SimpleMetricFeatures::type_name ( ) const
overridevirtual

Reimplemented from protocols::features::FeaturesReporter.

References class_name().

Referenced by parse_my_tag().

void protocols::features::SimpleMetricFeatures::write_general_schema_to_db ( utility::sql_database::sessionOP  db_session) const
private

References metrics_, and table_name_.

Referenced by write_schema_to_db().

void protocols::features::SimpleMetricFeatures::write_per_residue_data_row ( StructureID  struct_id,
core::Size  resnum,
utility::vector1< std::string > const &  data_names,
std::map< std::string, std::map< core::Size, std::string > > const &  string_data,
std::map< std::string, std::map< core::Size, core::Real > > const &  real_data,
utility::sql_database::sessionOP  db_session 
)
private
void protocols::features::SimpleMetricFeatures::write_per_residue_schema_to_db ( utility::sql_database::sessionOP  db_session) const
private

References metrics_, and table_name_.

Referenced by write_schema_to_db().

void protocols::features::SimpleMetricFeatures::write_schema_to_db ( utility::sql_database::sessionOP  db_session) const
overridevirtual

generate the table schemas and write them to the database

Implements protocols::features::FeaturesReporter.

References write_general_schema_to_db(), and write_per_residue_schema_to_db().

Member Data Documentation

bool protocols::features::SimpleMetricFeatures::fail_on_missing_cache_ = true
private
utility::vector1< core::simple_metrics::SimpleMetricCOP > protocols::features::SimpleMetricFeatures::metrics_
private
std::string protocols::features::SimpleMetricFeatures::prefix_ =""
private
std::string protocols::features::SimpleMetricFeatures::suffix_ =""
private
std::string protocols::features::SimpleMetricFeatures::table_name_ ="simple_metrics"
private
bool protocols::features::SimpleMetricFeatures::use_cache_ = false
private

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