Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PeriodicFunc.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/PeriodicFunc.hh
11 /// @brief Definition for a periodic function used in constraints.
12 /// @brief feel free to add definitions for other (derived) periodic functions to this file
13 /// @author Florian Richter
14 
15 #ifndef INCLUDED_core_scoring_constraints_PeriodicFunc_hh
16 #define INCLUDED_core_scoring_constraints_PeriodicFunc_hh
17 
19 
20 #include <utility/pointer/ReferenceCount.hh>
21 
22 //#include <numeric/angle.functions.hh>
23 
24 
25 namespace core {
26 namespace scoring {
27 namespace constraints {
28 
29 
30 /// @brief function of type y = ( k * cos(n * (x - x0) ) ) + C
31 class PeriodicFunc : public Func {
32 
33 public:
34  PeriodicFunc ( Real const x0_in, Real const k_in, Real const n_periodic_in, Real const C_in) : x0_( x0_in ), k_( k_in ), n_periodic_( n_periodic_in ), C_( C_in ){}
35 
36  FuncOP
37  clone() const { return new PeriodicFunc( *this ); }
38 
39  Real func( Real const x ) const;
40  Real dfunc( Real const x ) const;
41 
42  void read_data( std::istream& in );
43 
44  void show_definition( std::ostream &out ) const;
45 
46  Size
47  show_violations( std::ostream& out, Real x, Size verbose_level, core::Real threshold = 1 ) const;
48 
49 
50 private:
55 
56 
57 }; //periodic func
58 
59 
60 
61 } // constraints
62 } // scoring
63 } // core
64 
65 
66 #endif