Rosetta  2020.37
 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::func::SOGFunc Class Reference

Derived class of class Func representing a SOG distribution with a user-specified mean and standard deviation. More...

#include <SOGFunc.hh>

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

Public Member Functions

 SOGFunc ()
 
 SOGFunc (const utility::vector1< core::Real > &means, const utility::vector1< core::Real > &sdevs, const utility::vector1< core::Real > &weights)
 
 SOGFunc (core::Real mean, core::Real sdev)
 
FuncOP clone () const override
 returns a clone of this SOGFunc 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...
 
Real func (Real const x) const override
 Returns the value of this SOGFunc evaluated at distance x. More...
 
Real dfunc (Real const x) const override
 Returns the value of the first derivative of this SOGFunc at distance x. More...
 
void check_bounds (Real const x, Real const val) const
 
void show_definition (std::ostream &out) const override
 show the definition of this SOGFunc to the specified output stream. More...
 
void read_data (std::istream &in) override
 Initializes this SOGFunc from the given istream. 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...
 

Private Member Functions

void clear_ ()
 
core::Real get_alt_score_ (core::Real const x) const
 

Private Attributes

SOGFunc_Impl member_
 

Friends

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

Detailed Description

Derived class of class Func representing a SOG distribution with a user-specified mean and standard deviation.

Constructor & Destructor Documentation

core::scoring::func::SOGFunc::SOGFunc ( )
inline
core::scoring::func::SOGFunc::SOGFunc ( const utility::vector1< core::Real > &  means,
const utility::vector1< core::Real > &  sdevs,
const utility::vector1< core::Real > &  weights 
)
core::scoring::func::SOGFunc::SOGFunc ( core::Real  mean,
core::Real  sdev 
)

Member Function Documentation

void core::scoring::func::SOGFunc::check_bounds ( Real const  x,
Real const  val 
) const
void core::scoring::func::SOGFunc::clear_ ( )
private
FuncOP core::scoring::func::SOGFunc::clone ( ) const
inlineoverridevirtual

returns a clone of this SOGFunc

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

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

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

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

References core::scoring::func::SOGFunc_Impl::dfunc(), and member_.

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

Returns the value of this SOGFunc evaluated at distance x.

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

References core::scoring::func::SOGFunc_Impl::func(), and member_.

core::Real core::scoring::func::SOGFunc::get_alt_score_ ( core::Real const  x) const
private
bool core::scoring::func::SOGFunc::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 member_, same_type_as_me(), and core::scoring::func::Func::same_type_as_me().

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

Initializes this SOGFunc from the given istream.

The parameters are:

Initializes this SOGFunc from the given istream. An example of the type of string from which the istream should be constructed is: "SOGFUNC 2 19.396 7.643 0.4 17.312 2.4 0.6". The interpretation is to create initialize this SOGFunc object with the following parameters:

  • one Gaussian function with mean 19.396 and sd 7.643, weighted with a weight of 0.4
  • another Gaussian function with mean of 17.312 and sd 2.4, with a weight of 0.6. Weights need not add up to 1, but many times they will.

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

References member_, and core::scoring::func::SOGFunc_Impl::read_data().

bool core::scoring::func::SOGFunc::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::SOGFunc::show_definition ( std::ostream &  out) const
overridevirtual

show the definition of this SOGFunc to the specified output stream.

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

References member_, and core::scoring::func::SOGFunc_Impl::show_definition().

Friends And Related Function Documentation

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

Calls show( out ) on this SOGFunc.

Member Data Documentation

SOGFunc_Impl core::scoring::func::SOGFunc::member_
private

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