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
ConstantConstraint.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 core/scoring/constraints/ConstantConstraint.cc
11
12
#include <
core/types.hh
>
13
#include <
core/scoring/constraints/ConstantConstraint.hh
>
14
#include <
core/scoring/constraints/Func.hh
>
15
// AUTO-REMOVED #include <core/scoring/constraints/XYZ_Func.hh>
16
#include <
core/scoring/EnergyMap.hh
>
17
#include <
core/scoring/ScoreType.hh
>
18
19
#include <
core/id/AtomID.hh
>
20
21
#include <utility/vector1.hh>
22
23
24
namespace
core {
25
namespace
scoring {
26
namespace
constraints {
27
28
/// @brief compute score
29
Real
30
ConstantConstraint::score
()
const
{
31
return
func_
->func(0);
32
}
33
34
std::string
ConstantConstraint::type
()
const
{
35
return
"Constant"
;
36
}
37
38
/// @brief compute score
39
void
40
ConstantConstraint::score
(
XYZ_Func
const
&,
EnergyMap
const
&,
EnergyMap
& emap )
const
41
{
42
emap[ this->
score_type
() ] +=
score
();
43
}
44
45
/// @brief compute atom deriv
46
void
47
ConstantConstraint::fill_f1_f2
(
48
AtomID
const
& ,
49
XYZ_Func
const
&,
50
Vector
&
/*F1*/
,
51
Vector
&
/*F2*/
,
52
EnergyMap
const
&
53
)
const
{}
54
55
/// @brief Constructor
56
ConstantConstraint::ConstantConstraint
(
57
FuncOP
func_in,
// we take ownership of this guy
58
ScoreType
scotype
59
):
60
Constraint
( scotype ),
61
func_( func_in )
62
{}
63
64
ConstantConstraint::~ConstantConstraint
() {}
65
66
/// @brief number of atoms --- zero
67
Size
68
ConstantConstraint::natoms
()
const
69
{
70
return
0;
71
}
72
73
id::AtomID
const
&
74
ConstantConstraint::atom
(
core::Size
const
/*n*/
)
const
{
75
utility_exit_with_message(
"ConstantConstraint::atom() - no atoms exist"
);
76
return
*(
new
AtomID
);
// never happens
77
}
78
79
/// @brief output violation of constraint (none!)
80
Size
ConstantConstraint::show_violations
( std::ostream &,
pose::Pose
const
&,
Size
,
Real
)
const
{
81
return
0;
82
}
83
84
void
ConstantConstraint::show
( std::ostream& out )
const
{
85
out <<
"ConstantConstraint"
<< std::endl;
86
func_
->show( out );
87
}
88
89
}
// constraints
90
}
// scoring
91
}
// core
Generated on Sat Jun 1 2013 11:35:10 for Rosetta 3.5 by
1.8.4