Rosetta  2020.46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
core::scoring::func::USOGFunc Class Reference

Unnormalized, unbounded sum of Gaussians constraint. More...

#include <USOGFunc.hh>

Inheritance diagram for core::scoring::func::USOGFunc:
Inheritance graph
[legend]

Public Member Functions

 USOGFunc ()
 Used in conjunction with read_data() to initialize a new instance. More...
 
 USOGFunc (core::Real mean, core::Real std_dev, core::Real weight=1)
 Constructs a new instance with a single gaussian. More...
 
 USOGFunc (utility::vector1< core::Real > const &means, utility::vector1< core::Real > const &std_devs, utility::vector1< core::Real > const &weights)
 Constructs a new instance from the specified lists of means, standard deviations, and weights. Assumes that all lists have equal length and weights sum to 1. More...
 
 ~USOGFunc () override
 No-op virtual destructor. More...
 
FuncOP clone () const override
 This method must return a deep copy of this Func, meaning if this Func holds pointers to other Func objects, that it must clone those Func objects as well. More...
 
bool operator== (Func const &other) const override
 Equality operator. Looks for strict equality. Floating-point comparison is the rule rather than the exception. More...
 
bool same_type_as_me (Func const &other) const override
 Does the input Func, "other", have the same type as me? Necessary for the equality operator to function correctly. All derived Func classes must implement this function. More...
 
core::Real func (const core::Real x) const override
 Returns a value representing this function evaluated at a given point. More...
 
core::Real dfunc (const core::Real x) const override
 Returns a value representing the derivative of this function evaluated at a given point. More...
 
void read_data (std::istream &in) override
 Initializes this function from the given input stream. More...
 
void show_definition (std::ostream &out) const override
 Writes the definition of this function to the specific output stream. More...
 
core::Size numGaussians () const
 Returns the number of Gaussian components. More...
 
- Public Member Functions inherited from core::scoring::func::Func
 ~Func () override
 Automatically generated virtual destructor for class deriving directly from VirtualBase. More...
 
bool operator!= (Func const &other) const
 inequality operator – simply the negation of the (virtual) equality operator More...
 
virtual Real estimate_dfunc (Real const r) const
 Estimates the derivative of this function at a given radius by calculating the slope of the secant line from func(r) and func(r+1e-05). More...
 
virtual Real estimate_dfunc (Real const r, Real const h) const
 Estimates the derivative of this function at a given radius by calculating the slope of the secant line from func(r) and func(r+h). More...
 
virtual void show (std::ostream &out) const
 Prints out space-delimited columns for r, func, dfunc and dfunc_est. The values for func, dfunc and dfunc_est are plotted as a function of r, which is varied from 2-20 in steps of 0.5. The value for dfunc_est is the estimated by the method estimate_dfunc( r ). More...
 
virtual Size show_violations (std::ostream &out, Real r, Size verbose_level, Real threshold=1) const
 show some sort of stringified representation of the violations for this constraint. More...
 

Static Public Attributes

static Real background_prob = exp(-10.)
 

Private Member Functions

void resetInstance ()
 Resets all information associated with this instance. More...
 

Private Attributes

utility::vector1< core::Realmeans_
 
utility::vector1< core::Realstd_devs_
 
utility::vector1< core::Realweights_
 

Detailed Description

Unnormalized, unbounded sum of Gaussians constraint.

Constructor & Destructor Documentation

core::scoring::func::USOGFunc::USOGFunc ( )
inline

Used in conjunction with read_data() to initialize a new instance.

core::scoring::func::USOGFunc::USOGFunc ( core::Real  mean,
core::Real  std_dev,
core::Real  weight = 1 
)

Constructs a new instance with a single gaussian.

References means_, std_devs_, and weights_.

core::scoring::func::USOGFunc::USOGFunc ( utility::vector1< core::Real > const &  means,
utility::vector1< core::Real > const &  std_devs,
utility::vector1< core::Real > const &  weights 
)

Constructs a new instance from the specified lists of means, standard deviations, and weights. Assumes that all lists have equal length and weights sum to 1.

References means_, std_devs_, and weights_.

core::scoring::func::USOGFunc::~USOGFunc ( )
inlineoverride

No-op virtual destructor.

Member Function Documentation

FuncOP core::scoring::func::USOGFunc::clone ( ) const
overridevirtual

This method must return a deep copy of this Func, meaning if this Func holds pointers to other Func objects, that it must clone those Func objects as well.

Implements core::scoring::func::Func.

core::Real core::scoring::func::USOGFunc::dfunc ( const core::Real  x) const
overridevirtual

Returns a value representing the derivative of this function evaluated at a given point.

Implements core::scoring::func::Func.

References background_prob, means_, numGaussians(), protocols::hybridization::score, SQRT_2PI, std_devs_, and weights_.

core::Real core::scoring::func::USOGFunc::func ( const core::Real  x) const
overridevirtual

Returns a value representing this function evaluated at a given point.

Implements core::scoring::func::Func.

References background_prob, means_, numGaussians(), protocols::hybridization::score, SQRT_2PI, std_devs_, and weights_.

core::Size core::scoring::func::USOGFunc::numGaussians ( ) const

Returns the number of Gaussian components.

References means_.

Referenced by dfunc(), func(), and show_definition().

bool core::scoring::func::USOGFunc::operator== ( Func const &  other) const
overridevirtual

Equality operator. Looks for strict equality. Floating-point comparison is the rule rather than the exception.

Implements core::scoring::func::Func.

References means_, core::scoring::func::Func::same_type_as_me(), same_type_as_me(), std_devs_, and weights_.

void core::scoring::func::USOGFunc::read_data ( std::istream &  in)
overridevirtual

Initializes this function from the given input stream.

Reimplemented from core::scoring::func::Func.

References means_, core::scoring::func::readValueOrDie(), resetInstance(), std_devs_, and weights_.

void core::scoring::func::USOGFunc::resetInstance ( )
private

Resets all information associated with this instance.

References means_, std_devs_, and weights_.

Referenced by read_data().

bool core::scoring::func::USOGFunc::same_type_as_me ( Func const &  other) const
overridevirtual

Does the input Func, "other", have the same type as me? Necessary for the equality operator to function correctly. All derived Func classes must implement this function.

Implements core::scoring::func::Func.

Referenced by operator==().

void core::scoring::func::USOGFunc::show_definition ( std::ostream &  out) const
overridevirtual

Writes the definition of this function to the specific output stream.

Reimplemented from core::scoring::func::Func.

References means_, numGaussians(), std_devs_, and weights_.

Member Data Documentation

Real core::scoring::func::USOGFunc::background_prob = exp(-10.)
static

Referenced by dfunc(), and func().

utility::vector1<core::Real> core::scoring::func::USOGFunc::means_
private
utility::vector1<core::Real> core::scoring::func::USOGFunc::std_devs_
private
utility::vector1<core::Real> core::scoring::func::USOGFunc::weights_
private

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