Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
KarplusFunc.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/HarmonicFunc.hh
11 /// @brief Definition for functions used in definition of constraints.
12 /// @author Nikolas Sgourakis
13 
14 #ifndef INCLUDED_core_scoring_constraints_KarplusFunc_hh
15 #define INCLUDED_core_scoring_constraints_KarplusFunc_hh
16 
19 #include <core/types.hh>
20 
21 // C++ Headers
22 
23 namespace core {
24 namespace scoring {
25 namespace constraints {
26 
27 /// @brief Function that evaluates a J-coupling from dihedral angles in radians, for applications like DihedralConstraint.
28 /// Prevents discontinuities at 0/360 or -180/180 degrees for dihedral constraints.
29 class KarplusFunc : public Func {
30 public:
31 
33  Real const A_Hertz , Real const B_Hertz, Real const C_Hertz, Real const Dphi_radians, Real const x0_Hertz, Real const sd_Hertz, Real const offset=0.0
34  ):A_(A_Hertz), B_(B_Hertz), C_(C_Hertz), Dphi_(Dphi_radians), x0_( x0_Hertz ), sd_( sd_Hertz ), offset_( offset ) {}
35 
36  FuncOP clone() const { return new KarplusFunc( *this ); }
37 
38  Real func( Real const x ) const;
39  Real dfunc( Real const x ) const;
40 
41  virtual void read_data( std::istream & in );
42  virtual void show_definition( std::ostream & out ) const;
43 
44 private:
52 };
53 
54 } // constraints
55 } // scoring
56 } // core
57 
58 #endif