Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | Private Attributes | List of all members
core::scoring::epr_deer::metrics::DEERDistanceDistribution Class Reference

#include <DEERDistanceDistribution.hh>

Inheritance diagram for core::scoring::epr_deer::metrics::DEERDistanceDistribution:
Inheritance graph
[legend]

Public Member Functions

Real get_score (std::map< Size, Real > const &sim_histr) override
 Virtual function to evaluate score given a distribution. More...
 
utility::vector1< std::map
< Size, Real > > 
expand_hists (std::map< Size, Real > const &distr)
 Expand distance distribution into multiple distributions. More...
 
utility::vector1< Realget_prs (Size const &bin) const
 Get range of possible P(r) values for experimental distribution. More...
 
void lower_bound (std::map< Size, Real > const &val)
 Sets the lower bound/confidence band for the distance distribution. More...
 
void best_fit (std::map< Size, Real > const &val)
 Sets the line of best fit. More...
 
void upper_bound (std::map< Size, Real > const &val)
 Sets the upper bound/confidence band for the distance distribution. More...
 
void bounds (bool const &val)
 Set whether confidence bands will be used when calculating score. More...
 
void reverse (bool const &val)
 Set whether to compute the reverse metric. More...
 
void bb (bool const &val)
 Set whether to use confidence bands. More...
 
void singleval (bool const &val)
 Set whether to use a single distance. More...
 
void integral (bool const &val)
 Set whether to compute the integral. More...
 
std::map< Size, Real > const & lower_bound () const
 Returns the lower bound/confidence band for the distribution. More...
 
std::map< Size, Real > const & best_fit () const
 Returns the best fit of the distance distribution. More...
 
std::map< Size, Real > const & upper_bound () const
 Returns the upper bound/confidence band for the distribution. More...
 
bool bounds () const
 Returns whether confidence bands are being used. More...
 
bool reverse () const
 Returns whether the reverse metric is being used. More...
 
bool bb () const
 Returns whether backbone expansion is being used. More...
 
bool singleval () const
 Returns whether calculation of a single distance is being used. More...
 
bool integral () const
 Returns whether calculation of the integral is being used. More...
 
- Public Member Functions inherited from core::scoring::epr_deer::metrics::DEERData
void print_histogram (std::map< Size, Real > const &sim_histr, std::string const &pose_name="NO NAME GIVEN") const
 Print the simulated distance distribution. More...
 
Real get_score (std::map< Size, Real > const &sim_histr, bool const &set_score)
 Function to evaluate score given a distribution. More...
 
std::map< Size, Realconvolute (std::map< Size, Real > const &distr, Real const &std) const
 Convolute a distribution with a Gaussian of a specific width. More...
 
utility::vector1
< PairSizeString > const & 
residues () const
 Returns the residues involved in this data set. More...
 
Size const & bins_per_a () const
 Returns bins per angstrom for distribution (default: 2) More...
 
Real score () const
 Returns the last computed score. More...
 
Real stdev () const
 Returns the standard deviation of the distributions to generate. More...
 
void residues (utility::vector1< PairSizeString > const &val)
 Sets residue for data set. More...
 
void bins_per_a (Size const &val)
 Set the number of bins per angstrom for the data set. More...
 
void score (Real const &val)
 Set the score of the data set. More...
 
void stdev (Real const &val)
 Set the standard deviation of the distributions to generate. More...
 
std::map< Size, Realdist_map () const
 Returns the map of distance values used for custom distributions. More...
 
void append_dist_id (Size dist_id, Real dist)
 Append distance ID to custom distance map. More...
 
utility::vector1< Realavg_stdev (std::map< Size, Real > const &histogram)
 Computes average distance of distribution for local functions. More...
 

Protected Attributes

std::map< Size, Realdistr_ = {}
 Best fit / distance distribution. More...
 
std::map< Size, Reallower_bound_ = {}
 Lower bound for distribution (95% confidence interval) More...
 
std::map< Size, Realupper_bound_ = {}
 Upper bound for distribution (95% confidence interval) More...
 
bool bounds_ = false
 Whether the calculation method uses confidence bands. More...
 
bool rev_ = false
 Whether the reverse metric is computed. More...
 
bool bb_ = false
 Whether backbone expansion is done (for Bayesian scoring) More...
 
bool singleval_ = false
 Whether a single value is being used for scoring. More...
 
bool integral_ = false
 Whether the integral is computed. More...
 
- Protected Attributes inherited from core::scoring::epr_deer::metrics::DEERData
Size bins_per_a_ = 2
 Bins per angstrom for distributions stored and scored. More...
 

Private Attributes

Real exp_stdev_ = 0.0
 The standard deviation of the experimental distribution. More...
 

Detailed Description

Derived class that stores the entire distance distribution Score is evaluated using the cross-entropy of the simulated from the experimental

Member Function Documentation

void core::scoring::epr_deer::metrics::DEERDistanceDistribution::bb ( bool const &  val)

Set whether to use confidence bands.

Parameters
valWhether to use confidence bands

References bb_, and protocols::hybridization::val.

Referenced by core::scoring::epr_deer::DEERIO::parse_dist_datatype().

bool core::scoring::epr_deer::metrics::DEERDistanceDistribution::bb ( ) const

Returns whether backbone expansion is being used.

Returns
Whether backbone expansion is being used

References bb_.

void core::scoring::epr_deer::metrics::DEERDistanceDistribution::best_fit ( std::map< Size, Real > const &  val)

Sets the line of best fit.

Parameters
valBest fit of DEER distribution

References distr_, and protocols::hybridization::val.

Referenced by core::scoring::epr_deer::DEERIO::parse_dist_lines().

std::map< Size, Real > const & core::scoring::epr_deer::metrics::DEERDistanceDistribution::best_fit ( ) const

Returns the best fit of the distance distribution.

The best fit of the distance distribution

References distr_.

void core::scoring::epr_deer::metrics::DEERDistanceDistribution::bounds ( bool const &  val)

Set whether confidence bands will be used when calculating score.

Parameters
valWhether to use confidence bands

References bounds_, and protocols::hybridization::val.

bool core::scoring::epr_deer::metrics::DEERDistanceDistribution::bounds ( ) const

Returns whether confidence bands are being used.

Returns
Whether confidence bands are being used

References bounds_.

utility::vector1< std::map< Size, Real > > core::scoring::epr_deer::metrics::DEERDistanceDistribution::expand_hists ( std::map< Size, Real > const &  distr)

Expand distance distribution into multiple distributions.

Parameters
distrSimulated distribution to expand
Returns
Vector of distributions Used for Bayesian analysis when backbone dynamics are not known and several possibilities must be taken into account

References core::scoring::epr_deer::metrics::DEERData::avg_stdev(), core::scoring::epr_deer::metrics::DEERData::convolute(), exp_stdev_, and protocols::mean_field::max().

Referenced by get_score().

utility::vector1< Real > core::scoring::epr_deer::metrics::DEERDistanceDistribution::get_prs ( Size const &  bin) const

Get range of possible P(r) values for experimental distribution.

Parameters
binValue of r
Returns
Vector of P(r) for Bayesian scoring with confidence bands

References bounds_, distr_, lower_bound_, protocols::mean_field::max(), core::scoring::epr_deer::probit(), upper_bound_, and protocols::hybridization::val.

Referenced by get_score().

Real core::scoring::epr_deer::metrics::DEERDistanceDistribution::get_score ( std::map< Size, Real > const &  sim_histr)
overridevirtual

Virtual function to evaluate score given a distribution.

Parameters
sim_histrSimulated DEER distribution
Returns
Freshly computed score Cross-entropy corresponds to the negative log-likelihood that the experimental distribution could have given rise to the simulated. This allows boltzmann weighting and/or Bayesian statistical inference from score Note that although confidence bands can be received as input, they are not currently used for this purpose. If you know an information-theoretic approach to using them, please contact me. I would live to incorporate that information here.
Parameters
sim_histrSimulated DEER distribution
Returns
Freshly computed score This is the default method when using DEER distance distributions. It computes the cross entropy of the distribution, also called the negative log-likelihood. It contains three loops. First, it iterates over each bin in either the simulated or the experimental DEER distance distribution. Second, it iterates over a series of simulated DEER distribution generated by the taking into account the possibility of backbone dynamics. Finally, it iterates over a range of possible experimental P(r) values obtained from confidence bands (a range of 2-sigma, or 95% confidence, is assumed) Specialized methods can be used instead by declaring in the file being read. See DEERIO.cc for details

Implements core::scoring::epr_deer::metrics::DEERData.

Reimplemented in core::scoring::epr_deer::metrics::DEERJaccardMethod, core::scoring::epr_deer::metrics::DEERJSMethod, core::scoring::epr_deer::metrics::DEERMiscMethod, and core::scoring::epr_deer::metrics::DEEROverlapMethod.

References core::scoring::epr_deer::metrics::DEERData::avg_stdev(), bb_, distr_, exp_stdev_, expand_hists(), get_prs(), core::scoring::epr_deer::ln(), and rev_.

void core::scoring::epr_deer::metrics::DEERDistanceDistribution::integral ( bool const &  val)

Set whether to compute the integral.

Parameters
valWhether to compute the integral

References integral_, and protocols::hybridization::val.

Referenced by core::scoring::epr_deer::DEERIO::parse_dist_datatype().

bool core::scoring::epr_deer::metrics::DEERDistanceDistribution::integral ( ) const

Returns whether calculation of the integral is being used.

Returns
Whether calculation of the integral is being used

References integral_.

void core::scoring::epr_deer::metrics::DEERDistanceDistribution::lower_bound ( std::map< Size, Real > const &  val)

Sets the lower bound/confidence band for the distance distribution.

Parameters
valLower bound or confidence band. Note: Can be negative!

References lower_bound_, and protocols::hybridization::val.

std::map< Size, Real > const & core::scoring::epr_deer::metrics::DEERDistanceDistribution::lower_bound ( ) const

Returns the lower bound/confidence band for the distribution.

Returns
The lower bound/confidence band for the distribution

References lower_bound_.

void core::scoring::epr_deer::metrics::DEERDistanceDistribution::reverse ( bool const &  val)

Set whether to compute the reverse metric.

Parameters
valWhether to compute the reverse metric

References rev_, and protocols::hybridization::val.

bool core::scoring::epr_deer::metrics::DEERDistanceDistribution::reverse ( ) const

Returns whether the reverse metric is being used.

Returns
Whether the reverse metric is being used

References rev_.

void core::scoring::epr_deer::metrics::DEERDistanceDistribution::singleval ( bool const &  val)

Set whether to use a single distance.

Parameters
valWhether to use a single distance

References singleval_, and protocols::hybridization::val.

Referenced by core::scoring::epr_deer::DEERIO::parse_dist_datatype().

bool core::scoring::epr_deer::metrics::DEERDistanceDistribution::singleval ( ) const

Returns whether calculation of a single distance is being used.

Returns
Whether calculation of a single distance is being used

References singleval_.

void core::scoring::epr_deer::metrics::DEERDistanceDistribution::upper_bound ( std::map< Size, Real > const &  upper_bound)

Sets the upper bound/confidence band for the distance distribution.

Parameters
valLower bound or confidence band.

References upper_bound(), and upper_bound_.

std::map< Size, Real > const & core::scoring::epr_deer::metrics::DEERDistanceDistribution::upper_bound ( ) const

Returns the upper bound/confidence band for the distribution.

Returns
The upper bound/confidence band for the distribution

References upper_bound_.

Referenced by upper_bound().

Member Data Documentation

bool core::scoring::epr_deer::metrics::DEERDistanceDistribution::bb_ = false
protected

Whether backbone expansion is done (for Bayesian scoring)

Referenced by bb(), and get_score().

bool core::scoring::epr_deer::metrics::DEERDistanceDistribution::bounds_ = false
protected
std::map< Size, Real > core::scoring::epr_deer::metrics::DEERDistanceDistribution::distr_ = {}
protected
Real core::scoring::epr_deer::metrics::DEERDistanceDistribution::exp_stdev_ = 0.0
private

The standard deviation of the experimental distribution.

Referenced by expand_hists(), and get_score().

bool core::scoring::epr_deer::metrics::DEERDistanceDistribution::integral_ = false
protected

Whether the integral is computed.

Referenced by core::scoring::epr_deer::metrics::DEEROverlapMethod::get_score(), and integral().

std::map< Size, Real > core::scoring::epr_deer::metrics::DEERDistanceDistribution::lower_bound_ = {}
protected
bool core::scoring::epr_deer::metrics::DEERDistanceDistribution::rev_ = false
protected

Whether the reverse metric is computed.

Referenced by core::scoring::epr_deer::metrics::DEERChiSqMethod::get_score(), get_score(), and reverse().

bool core::scoring::epr_deer::metrics::DEERDistanceDistribution::singleval_ = false
protected

Whether a single value is being used for scoring.

Referenced by core::scoring::epr_deer::metrics::DEEROverlapMethod::get_score(), and singleval().

std::map< Size, Real > core::scoring::epr_deer::metrics::DEERDistanceDistribution::upper_bound_ = {}
protected

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