Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FadeFunc.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/FadeFunc.hh
11 /// @brief Definition for functions used in definition of constraints.
12 /// @author Rhiju Das
13 
14 #ifndef INCLUDED_core_scoring_constraints_FadeFunc_HH
15 #define INCLUDED_core_scoring_constraints_FadeFunc_HH
16 
18 
20 
21 #include <core/types.hh>
22 
23 #include <utility/pointer/ReferenceCount.hh>
24 
25 
26 // C++ Headers
27 
28 namespace core {
29 namespace scoring {
30 namespace constraints {
31 
32 class FadeFunc : public Func {
33 public:
34 
35 
37  Real const fade_zone, Real const well_depth,
38  Real const well_offset ):
39  cutoff_lower_( cutoff_lower ),
40  cutoff_upper_( cutoff_upper ),
41  fade_zone_( fade_zone ),
42  well_depth_( well_depth ),
43  well_offset_( well_offset ){}
44 
46  Real const fade_zone, Real const well_depth ):
47  cutoff_lower_( cutoff_lower ),
48  cutoff_upper_( cutoff_upper ),
49  fade_zone_( fade_zone ),
50  well_depth_( well_depth ),
51  well_offset_( 0.0 ){}
52 
54  Real const fade_zone ):
55  cutoff_lower_( cutoff_lower ),
56  cutoff_upper_( cutoff_upper ),
57  fade_zone_( fade_zone ),
58  well_depth_( 1.0 ),
59  well_offset_( 0.0 ){}
60 
61  FuncOP
62  clone() const;
63 
64  Real func( Real const x ) const;
65  Real dfunc( Real const x ) const;
66 
67  void read_data( std::istream& in );
68 
69  void show_definition( std::ostream &out ) const;
70 
71  Real cutoff_upper() const { return cutoff_upper_; }
72  Real cutoff_lower() const { return cutoff_lower_; }
73  Real fade_zone() const { return fade_zone_; }
74 
75  void cutoff_upper( Real x ) { cutoff_upper_ = x; }
76  void cutoff_lower( Real x ) { cutoff_lower_ = x; }
77  void fade_zone( Real x ) { fade_zone_ = x; }
78 
79  Size
80  show_violations( std::ostream& out, Real x, Size verbose_level, core::Real threshold = 1 ) const;
81 
82 private:
88 
89 };
90 
91 
92 
93 } // constraints
94 } // scoring
95 } // core
96 
97 #endif