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
MultiConstraint.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 core/scoring/constraints/MultiConstraint.hh
11
/// @brief contains declarations for a type of constraint that holds multiple
12
/// other constrains that belong to each other and are all evaluate at once
13
/// @author Florian Richter (floric@u.washington.edu, march 2008)
14
15
16
#ifndef INCLUDED_core_scoring_constraints_MultiConstraint_hh
17
#define INCLUDED_core_scoring_constraints_MultiConstraint_hh
18
19
#include <
core/scoring/constraints/MultiConstraint.fwd.hh
>
20
21
// Unit header
22
#include <
core/scoring/constraints/Constraint.hh
>
23
24
// AUTO-REMOVED #include <core/scoring/constraints/XYZ_Func.hh>
25
#include <
core/scoring/ScoreType.hh
>
26
27
#include <
core/id/AtomID.hh
>
28
#include <
core/scoring/EnergyMap.fwd.hh
>
29
#include <
core/scoring/constraints/FuncFactory.fwd.hh
>
30
#include <
core/scoring/ScoreFunction.fwd.hh
>
31
#include <
core/scoring/constraints/XYZ_Func.fwd.hh
>
32
#include <
core/conformation/Conformation.fwd.hh
>
33
#include <
core/pose/Pose.fwd.hh
>
34
#include <numeric/random/random.fwd.hh>
35
#include <
core/kinematics/ShortestPathInFoldTree.fwd.hh
>
36
//Utility Headers
37
#include <numeric/xyzVector.fwd.hh>
38
39
// STL Headers
40
#include <map>
41
42
#include <utility/vector1.hh>
43
44
45
namespace
core {
46
namespace
scoring {
47
namespace
constraints {
48
49
50
class
MultiConstraint
:
public
Constraint
{
51
public
:
52
53
/// @brief default Constructor
54
MultiConstraint
(
ScoreType
const
&
t
=
dof_constraint
):
55
Constraint
(
t
),
56
report_this_as_effective_sequence_separation_
( 0 )
57
{}
58
59
/// @brief Constructor
60
MultiConstraint
(
const
ConstraintCOPs
& cst_in,
ScoreType
const
&
t
=
dof_constraint
);
61
62
///
63
virtual
64
ConstraintOP
clone
()
const
{
65
if
(
member_constraints_
.size() > 0 ) {
66
return
new
MultiConstraint
(
member_constraints_
);
67
}
else
{
68
return
new
MultiConstraint
();
69
}
70
}
71
72
virtual
73
MultiConstraintOP
empty_clone
()
const
{
74
return
new
MultiConstraint
;
75
}
76
77
/// @brief number of atoms involved in this MultiConstraint container
78
Size
natoms
()
const
79
{
80
return
member_atoms_
.size();
81
}
82
/// @brief number of constraints data
83
Size
size
()
const
{
return
member_constraints_
.size(); }
84
85
virtual
std::string
type
()
const
{
86
return
"MultiConstraint"
;
87
}
88
89
/// @brief read in constraint defiinition
90
virtual
91
void
read_def
( std::istream& data,
pose::Pose
const
& pose,
FuncFactory
const
& func_factory );
92
93
/// @brief possibility to compare constraint according to data
94
/// and not just pointers
95
virtual
96
bool
operator ==
(
Constraint
const
& other )
const
;
97
98
/// @brief compute score
99
virtual
100
void
101
score
(
XYZ_Func
const
& xyz_func,
EnergyMap
const
& weights,
EnergyMap
& emap )
const
;
102
103
virtual
104
AtomID
const
&
atom
(
Size
const
n )
const
{
105
assert( n <=
member_atoms_
.size() );
106
return
member_atoms_
[n];
107
}
108
109
virtual
110
utility::vector1< core::Size >
111
residues
()
const
{
return
member_residues_
; }
112
113
//@brief translates the atom-names into numbers
114
virtual
void
setup_for_scoring
(
XYZ_Func
const
&,
ScoreFunction
const
& )
const
;
115
116
///@brief add individual constraint into MultiConstraint
117
virtual
118
void
119
add_individual_constraint
(
ConstraintCOP
cst_in );
120
121
virtual
122
ConstraintOP
123
remap_resid
(
core::id::SequenceMapping
const
&seqmap )
const
;
124
125
/// @brief compute atom deriv
126
virtual
127
void
128
fill_f1_f2
(
129
AtomID
const
&
atom
,
130
XYZ_Func
const
&
xyz
,
131
Vector
& F1,
132
Vector
& F2,
133
EnergyMap
const
& weights
134
)
const
;
135
136
virtual
137
void
show
( std::ostream& out )
const
;
138
139
virtual
140
void
show_def
( std::ostream& out,
pose::Pose
const
& pose )
const
;
141
142
virtual
143
Size
show_violations
( std::ostream & out,
pose::Pose
const
& pose,
Size
verbose_level,
Real
threshold = 1.0 )
const
;
144
145
ConstraintCOPs
const
&
146
member_constraints
()
const
{
147
return
member_constraints_
;
148
}
149
150
virtual
ConstraintOP
remapped_clone
(
151
pose::Pose
const
&
/*src*/
,
152
pose::Pose
const
&
/*dest*/
,
153
id::SequenceMappingCOP
map=NULL )
const
;
154
155
void
set_effective_sequence_separation
(
core::Size
setting ) {
156
report_this_as_effective_sequence_separation_
= setting;
157
}
158
159
virtual
160
core::Size
choose_effective_sequence_separation
(
core::kinematics::ShortestPathInFoldTree
const
& sp, numeric::random::RandomGenerator& );
161
162
virtual
163
core::Size
effective_sequence_separation
(
core::kinematics::ShortestPathInFoldTree
const
& )
const
{
164
return
report_this_as_effective_sequence_separation_
;
165
}
166
167
protected
:
168
169
//vector that holds the constraints
170
ConstraintCOPs
member_constraints_
;
171
172
private
:
173
174
//data structure that holds the atoms and atom numbers
175
utility::vector1< core::Size >
member_residues_
;
176
utility::vector1< AtomID >
member_atoms_
;
177
std::map< AtomID, ConstraintCOPs >
AtomID_to_Csts_
;
178
179
//
180
core::Size
report_this_as_effective_sequence_separation_
;
181
182
};
//MultiConstraint
183
184
}
//constraints
185
}
//scoring
186
}
//core
187
188
#endif
Generated on Sat Jun 1 2013 11:35:40 for Rosetta 3.5 by
1.8.4