Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
core::scoring::constraints::MixtureFunc Class Reference

Derived class of class Func representing a Mixture of several distinct functions. The function is of the form ln( g(r) / h(r) ), where g(r) is a mixture of a Gaussian and Exponential distributions, and h(r) is a Gaussian distribution. See methods and implementation for more information. More...

#include <MixtureFunc.hh>

Inheritance diagram for core::scoring::constraints::MixtureFunc:
Inheritance graph
[legend]
Collaboration diagram for core::scoring::constraints::MixtureFunc:
Collaboration graph
[legend]

Public Member Functions

 MixtureFunc (Real const anchor, Real const gaussian_param, Real const exp_param, Real const mixture_param, Real const bg_mean, Real const bg_sd)
 
FuncOP clone () const
 returns a clone of this MixtureFunc More...
 
Real func (Real const x) const
 Returns the value of this MixtureFunc evaluated at distance x. More...
 
Real dfunc (Real const x) const
 Returns the value of the first derivative of this MixtureFunc at distance x. More...
 
virtual void show_definition (std::ostream &out) const
 show the definitio of this MixtureFunc to the specified output stream. More...
 
Real dfunc_component (Real const x, Real &g, Real &h, Real &g_prime, Real &h_prime) const
 Function that's used for debugging. Given x, this calculates g(x), h(x), g'(x) and h'(x). More...
 
Real calc_kl_divergence () const
 Calculates the K-L divergence between the inferred and background distributions. More...
 
virtual void show (std::ostream &out) const
 Prints this MixtureFunc to the given ostream. More...
 
void read_data (std::istream &in)
 The parameters are: More...
 
Real func_ (Real x) const
 Returns the value of this MixtureFunc evaluated at distance x. More...
 
- Public Member Functions inherited from core::scoring::constraints::Func
virtual ~Func ()
 Automatically generated virtual destructor for class deriving directly from ReferenceCount. 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 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...
 

Private Member Functions

void verify_parameters_ ()
 

Private Attributes

Real rmax_
 
Real fmax_
 
Real anchor_
 
Real gaussian_param_
 
Real exp_param_
 
Real mixture_param_
 
Real bg_mean_
 
Real bg_sd_
 

Friends

std::ostream & operator<< (std::ostream &out, const MixtureFunc &f)
 Calls show( out ) on this MixtureFunc. More...
 

Detailed Description

Derived class of class Func representing a Mixture of several distinct functions. The function is of the form ln( g(r) / h(r) ), where g(r) is a mixture of a Gaussian and Exponential distributions, and h(r) is a Gaussian distribution. See methods and implementation for more information.

Definition at line 30 of file MixtureFunc.hh.

Constructor & Destructor Documentation

core::scoring::constraints::MixtureFunc::MixtureFunc ( Real const  anchor,
Real const  gaussian_param,
Real const  exp_param,
Real const  mixture_param,
Real const  bg_mean,
Real const  bg_sd 
)
inline

Constructor for MixtureFunc. Arguments to the constructor are:

  • anchor: parameter representing the value at which this function is anchored, represents the mean of the Gaussian distribution and the highest point of the exponential distribution.
  • gaussian_param: parameter for Gaussian portion of g(r), representing the standard deviation of a Gaussian distribution around anchor.
  • exp_param: parameter for Exponential portion of g(r), representing the rate at which the exponential distribution drops off from anchor.
  • mixture_param: parameter describing the mixture of the Gaussian and Exponential functions that make up g(r).
  • bg_mean: parameter representing the mean of h(r).
  • bg_sd: parameter representing the standard deviation of h(r).

Definition at line 47 of file MixtureFunc.hh.

References anchor_, and verify_parameters_().

Referenced by clone().

Member Function Documentation

Real core::scoring::constraints::MixtureFunc::calc_kl_divergence ( ) const

Calculates the K-L divergence between the inferred and background distributions.

Definition at line 197 of file MixtureFunc.cc.

References core::sequence::end, and protocols::loops::start.

FuncOP core::scoring::constraints::MixtureFunc::clone ( ) const
inlinevirtual

returns a clone of this MixtureFunc

Implements core::scoring::constraints::Func.

Definition at line 68 of file MixtureFunc.hh.

References MixtureFunc().

Real core::scoring::constraints::MixtureFunc::dfunc ( Real const  x) const
virtual

Returns the value of the first derivative of this MixtureFunc at distance x.

Implements core::scoring::constraints::Func.

Definition at line 122 of file MixtureFunc.cc.

Real core::scoring::constraints::MixtureFunc::dfunc_component ( Real const  x,
Real g,
Real h,
Real g_prime,
Real h_prime 
) const

Function that's used for debugging. Given x, this calculates g(x), h(x), g'(x) and h'(x).

Definition at line 134 of file MixtureFunc.cc.

References core::scoring::constraints::dexponential(), core::scoring::constraints::dgaussian(), core::scoring::constraints::exponential_deriv(), and core::scoring::constraints::gaussian_deriv().

Real core::scoring::constraints::MixtureFunc::func ( Real const  x) const
virtual

Returns the value of this MixtureFunc evaluated at distance x.

Implements core::scoring::constraints::Func.

Definition at line 98 of file MixtureFunc.cc.

Real core::scoring::constraints::MixtureFunc::func_ ( Real  x) const

Returns the value of this MixtureFunc evaluated at distance x.

private

Definition at line 68 of file MixtureFunc.cc.

References core::scoring::constraints::dexponential(), and core::scoring::constraints::dgaussian().

void core::scoring::constraints::MixtureFunc::read_data ( std::istream &  in)
virtual

The parameters are:

Initializes this MixtureFunc from the given istream. An example of the type of string from which the istream should be constructed is: "MIXTUREFUNC 6.9734 3.598 0.222 0.872 19.396 7.643". The interpretation is to create initialize this MixtureFunc object with the following parameters:

  • anchor 6.9734
  • gaussian_param 3.598
  • exp_param 0.222
  • mixture_param 0.872
  • bg_mean 19.396
  • bg_sd 7.643

Reimplemented from core::scoring::constraints::Func.

Definition at line 49 of file MixtureFunc.cc.

void core::scoring::constraints::MixtureFunc::show ( std::ostream &  out) const
virtual

Prints this MixtureFunc to the given ostream.

Reimplemented from core::scoring::constraints::Func.

Definition at line 158 of file MixtureFunc.cc.

References protocols::comparative_modeling::features::A, core::sequence::end, and protocols::loops::start.

void core::scoring::constraints::MixtureFunc::show_definition ( std::ostream &  out) const
virtual

show the definitio of this MixtureFunc to the specified output stream.

Reimplemented from core::scoring::constraints::Func.

Definition at line 191 of file MixtureFunc.cc.

void core::scoring::constraints::MixtureFunc::verify_parameters_ ( )
private

Definition at line 54 of file MixtureFunc.cc.

Referenced by MixtureFunc().

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const MixtureFunc f 
)
friend

Calls show( out ) on this MixtureFunc.

Definition at line 97 of file MixtureFunc.hh.

Member Data Documentation

Real core::scoring::constraints::MixtureFunc::anchor_
private

Definition at line 128 of file MixtureFunc.hh.

Referenced by MixtureFunc().

Real core::scoring::constraints::MixtureFunc::bg_mean_
private

Definition at line 132 of file MixtureFunc.hh.

Real core::scoring::constraints::MixtureFunc::bg_sd_
private

Definition at line 133 of file MixtureFunc.hh.

Real core::scoring::constraints::MixtureFunc::exp_param_
private

Definition at line 130 of file MixtureFunc.hh.

Real core::scoring::constraints::MixtureFunc::fmax_
private

Definition at line 127 of file MixtureFunc.hh.

Real core::scoring::constraints::MixtureFunc::gaussian_param_
private

Definition at line 129 of file MixtureFunc.hh.

Real core::scoring::constraints::MixtureFunc::mixture_param_
private

Definition at line 131 of file MixtureFunc.hh.

Real core::scoring::constraints::MixtureFunc::rmax_
private

Definition at line 126 of file MixtureFunc.hh.


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