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
optimization
symmetry
SymMinimizerMap.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
// This file is part of the Rosetta software suite and is made available under license.
5
// The Rosetta software is developed by the contributing members of the Rosetta Commons consortium.
6
// (C) 199x-2009 Rosetta Commons participating institutions and developers.
7
// For more information, see http://www.rosettacommons.org/.
8
9
/// @file core/optimization/SymMinimizerMap.hh
10
/// @brief MinimizerMap for symmetric minimization.
11
/// @author Andrew Leaver-Fay (aleaverfay@gmail.com)
12
13
#ifndef INCLUDED_core_optimization_symmetry_SymMinimizerMap_hh
14
#define INCLUDED_core_optimization_symmetry_SymMinimizerMap_hh
15
16
// Unit headers
17
#include <
core/optimization/symmetry/SymMinimizerMap.fwd.hh
>
18
19
// Package headers
20
#include <
core/optimization/types.hh
>
21
#include <
core/optimization/DOF_Node.fwd.hh
>
22
23
// Project headers
24
#include <
core/id/AtomID_Map.hh
>
25
#include <
core/id/DOF_ID_Map.hh
>
26
#include <
core/kinematics/MinimizerMapBase.hh
>
27
#include <
core/pose/Pose.fwd.hh
>
28
#include <
core/scoring/DerivVectorPair.hh
>
29
// AUTO-REMOVED #include <core/scoring/ScoreFunction.fwd.hh>
30
#include <
core/conformation/symmetry/SymmetryInfo.fwd.hh
>
31
32
#include <
core/kinematics/MoveMap.fwd.hh
>
33
34
// Utility headers
35
#include <utility/vector1.hh>
36
37
// C++ headers
38
#include <list>
39
40
#include <
core/scoring/DerivVectorPair.fwd.hh
>
41
#include <ObjexxFCL/FArray1D.hh>
42
43
#ifdef WIN32
44
#include <
core/optimization/DOF_Node.hh
>
45
#endif
46
47
namespace
core {
48
namespace
optimization {
49
namespace
symmetry {
50
51
/// @brief Atom tree multifunction class
52
class
SymMinimizerMap
:
public
kinematics::MinimizerMapBase
{
53
public
:
54
typedef
conformation::symmetry::SymmetryInfoCOP
SymmetryInfoCOP
;
55
typedef
std::list< DOF_NodeOP >
DOF_Nodes
;
56
typedef
DOF_Nodes::const_iterator
const_iterator
;
57
//typedef DOF_Nodes::iterator iterator;
58
59
public
:
// Creation
60
61
// c-tor
62
SymMinimizerMap
(
63
pose::Pose
const
& pose,
// must have been scored before this setup; energy map must be up-to-date
64
kinematics::MoveMap
const
& mm,
// does not have to be "symmetric" -- it will be symmetrized
65
SymmetryInfoCOP
symm_info
66
);
67
68
/// @brief Destructor
69
virtual
70
~SymMinimizerMap
();
71
72
/// @brief The atom tree will report that a new torsion has been identified as free in the traversal of the atom tree.
73
/// If this is an independent torsion, then the SymMinimizerMap will add a new DOF_Node, but otherwise, will
74
/// ignore the DOF. The atom tree will traverse through dependent torsions in addition to independent torsions, and
75
/// it's the job of the SymMinimizerMap to weed out the dependent torsions.
76
virtual
77
void
78
add_torsion
(
79
DOF_ID
const
& new_torsion,
80
DOF_ID
const
& parent
81
);
82
83
/// @brief Add an atom to the list of atoms controlled by a given DOF. The SymMinimzierMap
84
/// will figure out, first, if the dof_id is a dependent or independent dof. If it's a dependent
85
/// DOF, then it will figure out if the given atom has any interactions with an independent residue.
86
/// If not, then the atom is ignored. If it does, then the SymMinimizerMap will figure out
87
/// what independent DOF the given dependent DOF is a a clone of, and add this atom as being controlled
88
/// by that dependent DOF.
89
virtual
90
void
91
add_atom
(
92
AtomID
const
& atom_id,
93
DOF_ID
const
& dof_id
94
);
95
96
virtual
97
kinematics::DomainMap
const
&
98
domain_map
()
const
;
99
100
void
101
copy_dofs_from_pose
(
102
pose::Pose
const
& pose,
103
Multivec
& dofs
104
)
const
;
105
106
void
107
copy_dofs_to_pose
(
108
pose::Pose
& pose,
109
Multivec
const
& dofs
110
)
const
;
111
112
DOF_NodeOP
113
dof_node_from_id
(
DOF_ID
const
&
id
)
const
;
114
115
Size
nangles
()
const
{
return
n_independent_dof_nodes_
; }
116
117
void
zero_torsion_vectors
();
118
119
void
link_torsion_vectors
();
120
121
Real
122
torsion_scale_factor
(
123
DOF_Node
const
& dof_node
124
)
const
;
125
126
void
127
reset_jump_rb_deltas
(
128
pose::Pose
& pose,
129
Multivec
& dofs
130
)
const
;
131
132
public
:
133
/// Allow read/write access to the DOF_Nodes themselves, but do not allow anyone to change the
134
/// DOF_Nodes list. Elements cannot be dropped from the list, nor should the list be clearable.
135
/// Of course: if you have a const iterator to a list element containing a pointer, then it is
136
/// entirely possible to perform non-const operations on the thing being pointed at.
137
/// HOWEVER, neither the pointer nor the list element can be changed.
138
139
/// @brief begin iterator for the independent dofs
140
const_iterator
141
begin
()
const
142
{
143
return
dof_nodes_
.begin();
144
145
}
146
/// @brief End iterator for the independent dofs
147
const_iterator
148
end
()
const
149
{
150
return
dof_nodes_
.end();
151
}
152
153
const_iterator
154
dependent_begin
()
const
155
{
156
return
dependent_dof_nodes_
.begin();
157
}
158
159
///
160
const_iterator
161
dependent_end
()
const
162
{
163
return
dependent_dof_nodes_
.end();
164
}
165
166
167
168
///
169
DOF_Nodes
const
&
170
dof_nodes
()
const
171
{
172
return
dof_nodes_
;
173
}
174
175
/// @brief Retrieve the per-atom derivatives that are accumulated in to
176
utility::vector1< scoring::DerivVectorPair >
&
177
atom_derivatives
(
Size
resid ) {
178
return
atom_derivatives_
[ resid ];
179
}
180
181
private
:
182
183
/// @brief Non-virtual method -- not invoked directly by the atom tree.
184
void
185
add_new_dof_node
(
186
DOF_ID
const
& new_torsion,
187
DOF_ID
const
& parent,
188
bool
dependent
189
);
190
191
/// @brief Convert a cloned dof into its equivalent in the asymmetric unit
192
id::DOF_ID
asymmetric_dof
(
DOF_ID
const
& cloned_dof )
const
;
193
194
void
assign_rosetta_torsions
(
pose::Pose
const
& pose );
195
196
197
private
:
198
pose::Pose
const
&
pose_
;
// needed in the add_torsion, and add_atom callback functions
199
SymmetryInfoCOP
symm_info_
;
200
utility::vector1< bool >
res_interacts_with_asymmetric_unit_
;
201
202
DOF_Nodes
dof_nodes_
;
203
DOF_Nodes
dependent_dof_nodes_
;
204
Size
n_dof_nodes_
;
205
Size
n_independent_dof_nodes_
;
206
207
/// pointer from DOF_ID to the corresponding DOF_NodeOP
208
id::DOF_ID_Map< DOF_NodeOP >
dof_node_pointer_
;
209
210
kinematics::DomainMap
domain_map_
;
211
212
utility::vector1< utility::vector1< scoring::DerivVectorPair >
>
atom_derivatives_
;
213
214
};
215
216
}
// symmetry
217
}
// namespace optimization
218
}
// namespace core
219
220
#endif
Generated on Sat Jun 1 2013 11:33:11 for Rosetta 3.5 by
1.8.4