Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FlatHarmonicFunc.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/FlatHarmonicFunc.hh
11 /// @brief Definition for functions used in definition of constraints.
12 /// @author Chris King modified from James Thompson
13 
14 #ifndef INCLUDED_core_scoring_constraints_FlatHarmonicFunc_hh
15 #define INCLUDED_core_scoring_constraints_FlatHarmonicFunc_hh
16 
19 #include <core/types.hh>
20 
21 // C++ Headers
22 
23 namespace core {
24 namespace scoring {
25 namespace constraints {
26 
27 class FlatHarmonicFunc : public Func {
28 public:
29  FlatHarmonicFunc( Real const x0_in, Real const sd_in, Real const tol_in ): x0_( x0_in ), sd_( sd_in ), tol_( tol_in ){}
30 
31  FuncOP
32  clone() const { return new FlatHarmonicFunc( *this ); }
33 
34  Real func( Real const x ) const;
35  Real dfunc( Real const x ) const;
36 
37  void read_data( std::istream & in );
38 
39  void show_definition( std::ostream &out ) const;
40 
41  Real x0() const {
42  return x0_;
43  }
44 
45  Real sd() const {
46  return sd_;
47  }
48 
49  Real tol() const {
50  return tol_;
51  }
52 
53  void x0( Real x ) {
54  x0_ = x;
55  }
56 
57  void sd( Real sd ) {
58  sd_ = sd;
59  }
60 
61  void tol( Real tol ) {
62  tol_ = tol;
63  }
64 
65  Size
66  show_violations( std::ostream& out, Real x, Size verbose_level, core::Real threshold = 1 ) const;
67 
68 private:
72 };
73 
74 } // constraints
75 } // scoring
76 } // core
77 
78 #endif