Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TopOutFunc.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/TopOutFunc.hh
11 /// @brief Implementation of phenix "top-out" function
12 /// Similar to Geman-McClure: harmonic near 'x0_', flat past 'limit_'
13 /// @author Frank DiMaio
14 
15 #ifndef INCLUDED_core_scoring_constraints_TopOutFunc_hh
16 #define INCLUDED_core_scoring_constraints_TopOutFunc_hh
17 
20 #include <core/types.hh>
21 
22 // C++ Headers
23 
24 namespace core {
25 namespace scoring {
26 namespace constraints {
27 
28 class TopOutFunc : public Func {
29 public:
30  TopOutFunc( Real weight_in, Real x0_in, Real limit_in ) :
31  x0_( x0_in ), weight_( weight_in), limit_( limit_in ) {}
32 
33  FuncOP
34  clone() const { return new TopOutFunc( *this ); }
35 
36  Real func( Real const x ) const;
37  Real dfunc( Real const x ) const;
38 
39  void read_data( std::istream & in );
40 
41  void show_definition( std::ostream &out ) const;
42 
43  Real x0() const { return x0_; }
44  Real limit() const { return limit_; }
45  Real weight() const { return weight_; }
46 
47  void x0( Real x ) { x0_ = x; }
48  void limit( Real limit ) { limit_ = limit; }
49  void weight( Real weight ) { weight_ = weight; }
50 
51  Size
52  show_violations( std::ostream& out, Real x, Size verbose_level, core::Real threshold = 1 ) const;
53 
54 private:
58 };
59 
60 } // constraints
61 } // scoring
62 } // core
63 
64 #endif