Rosetta 3.5
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
core
scoring
constraints
CircularHarmonicFunc.cc
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/CircularHarmonicFunc.cc
11
/// @brief Definition for functions used in definition of constraints.
12
/// @author James Thompson
13
14
#include <
core/scoring/constraints/CircularHarmonicFunc.hh
>
15
#include <numeric/angle.functions.hh>
16
#include <
core/types.hh
>
17
18
#include <iostream>
19
20
namespace
core {
21
namespace
scoring {
22
namespace
constraints {
23
24
Real
25
CircularHarmonicFunc::func
(
Real
const
x )
const
{
26
Real
const
z = ( numeric::nearest_angle_radians(x,
x0_
)-
x0_
)/
sd_
;
27
return
z * z +
offset_
;
28
}
29
30
Real
31
CircularHarmonicFunc::dfunc
(
Real
const
x )
const
{
32
return
2 * ( numeric::nearest_angle_radians(x,
x0_
)-
x0_
) / (
sd_
*
sd_
);
33
}
34
35
void
36
CircularHarmonicFunc::read_data
( std::istream & in ) {
37
in >>
x0_
>>
sd_
;
38
}
39
40
void
CircularHarmonicFunc::show_definition
( std::ostream & out )
const
41
{
42
out <<
"CircularHarmonicFunc "
<<
x0_
<<
' '
<<
sd_
;
43
}
44
45
}
// namespace constraints
46
}
// namespace scoring
47
}
// namespace core
48
Generated on Sat Jun 1 2013 11:35:09 for Rosetta 3.5 by
1.8.4