Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SoedingFunc.hh
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file src/core/scoring/constraints/SoedingFunc.hh
11 /// @brief Definition for Johannes Soeding-style distance restraints.
12 /// @author James Thompson
13 
14 #ifndef INCLUDED_core_scoring_constraints_SoedingFunc_hh
15 #define INCLUDED_core_scoring_constraints_SoedingFunc_hh
16 
18 #include <core/types.hh>
19 
20 // C++ Headers
21 
22 namespace core {
23 namespace scoring {
24 namespace constraints {
25 
26 /// @brief Derived class of class Func representing a Soeding distribution with a user-specified
27 /// mean and standard deviation.
28 class SoedingFunc : public Func {
29 public:
30 
32  : w1_(0.0), mean1_(0.0), sdev1_(0.0), w2_(0.0), mean2_(0.0), sdev2_(0.0)
33  {}
34 
35  /// @brief returns a clone of this SoedingFunc
36  FuncOP clone() const { return new SoedingFunc( *this ); }
37 
38  Real
39  compute_func( Real const x ) const;
40 
41  /// @brief Returns the value of this SoedingFunc evaluated at distance x.
42  Real func( Real const x ) const;
43 
44  /// @brief Returns the value of the first derivative of this SoedingFunc at distance x.
45  Real dfunc( Real const x ) const;
46 
47  /// @brief show the definition of this SoedingFunc to the specified output stream.
48  virtual void show_definition( std::ostream &out ) const;
49 
50  /// @brief Calls show( out ) on this SoedingFunc.
51  friend std::ostream& operator<<(std::ostream& out, const SoedingFunc& f ) {
52  f.show( out );
53  return out;
54  } // operator<<
55 
56  /// @brief Initializes this SoedingFunc from the given istream.
57  void read_data( std::istream & in );
58 
59 private:
61 };
62 
63 } // constraints
64 } // scoring
65 } // core
66 
67 #endif