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
protocols
simple_moves
MinMover.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
// (c) This file is part of the Rosetta software suite and is made available under license.
4
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
5
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
6
// (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
7
8
/// @file
9
/// @brief
10
/// @author
11
/// @author Monica Berrondo
12
13
#ifndef INCLUDED_protocols_simple_moves_MinMover_hh
14
#define INCLUDED_protocols_simple_moves_MinMover_hh
15
16
// Unit headers
17
#include <
protocols/simple_moves/MinMover.fwd.hh
>
18
19
// Package headers
20
#include <
protocols/moves/Mover.hh
>
21
22
#include <
protocols/filters/Filter.fwd.hh
>
23
24
#include <
core/kinematics/MoveMap.fwd.hh
>
25
#include <
core/optimization/MinimizerOptions.fwd.hh
>
26
#include <
core/pack/task/TaskFactory.hh
>
27
#include <
core/pose/Pose.fwd.hh
>
28
#include <
core/scoring/ScoreFunction.fwd.hh
>
29
#include <
core/types.hh
>
30
#include <
core/id/types.hh
>
31
32
#include <utility/vector1.hh>
33
34
35
// ObjexxFCL Headers
36
37
// C++ Headers
38
39
// Utility Headers
40
41
namespace
protocols {
42
namespace
simple_moves {
43
44
///////////////////////////////////////////////////////////////////////////////
45
/// @brief A protocols::moves::Mover that minimizes a Pose to a local energy minimum by
46
/// performing energy minimization of a ScoreFunction over the allowable
47
/// degrees of freedom, defined by a MoveMap. The minimization type,
48
/// minimization tolerance, and various other options can be also be set.
49
///
50
/// Common Methods:
51
/// MinMover.apply
52
/// MinMover.movemap
53
/// MinMover.score_function
54
class
MinMover
:
public
protocols::moves::Mover
55
{
56
public
:
57
58
typedef
core::scoring::ScoreFunctionCOP
ScoreFunctionCOP
;
59
typedef
core::optimization::MinimizerOptionsOP
MinimizerOptionsOP
;
60
typedef
core::optimization::MinimizerOptionsCOP
MinimizerOptionsCOP
;
61
typedef
core::Real
Real
;
62
63
private
:
64
// This type needs both DOF_Type and Torsion type to handle both
65
// backbone torsion angles and bond angles and bond lengths.
66
typedef
67
std::map<
68
std::pair< core::id::DOF_Type, core::id::TorsionType >,
69
core::pack::task::TaskFactoryOP
>
70
DOF_TaskMap
;
71
72
public
:
73
74
// default constructor
75
/// @brief Constructs a MinMover
76
/// minmover = protocols::simple_moves::MinMover()
77
MinMover
();
78
79
MinMover
(
std::string
const
& );
80
81
virtual
~MinMover
();
82
83
// constructor with arguments
84
MinMover
(
85
core::kinematics::MoveMapOP
movemap_in,
86
ScoreFunctionCOP
scorefxn_in,
87
std::string
const
& min_type_in,
88
Real
tolerance_in,
89
bool
use_nb_list_in,
90
bool
deriv_check_in =
false
,
91
bool
deriv_check_verbose_in =
false
92
);
93
94
virtual
protocols::moves::MoverOP
clone
()
const
;
95
virtual
protocols::moves::MoverOP
fresh_instance
()
const
;
96
/// @brief Called by protocols::moves::MoverFactory when constructing new protocols::moves::Movers. Takes care of the specific mover's parsing.
97
virtual
98
void
parse_my_tag
(
99
TagPtr
const
,
100
protocols::moves::DataMap
&,
101
Filters_map
const
&,
102
protocols::moves::Movers_map
const
&,
103
Pose
const
& );
104
105
void
parse_opts
(
106
TagPtr
const
,
107
protocols::moves::DataMap
& data_map,
108
Filters_map
const
&,
109
protocols::moves::Movers_map
const
&,
110
Pose
const
& );
111
112
void
parse_chi_and_bb
(
TagPtr
const
);
113
114
void
parse_dof_tasks
(
115
TagPtr
const
tag,
116
protocols::moves::DataMap
& data);
117
118
void
parse_dof_task_type
(
119
std::string
const
& tag_name,
120
core::id::DOF_Type
dof_type
,
121
core::id::TorsionType
torsion_type,
122
TagPtr
const
tag,
123
protocols::moves::DataMap
& data);
124
125
virtual
void
parse_def_opts
( utility::lua::LuaObject
const
& def,
126
utility::lua::LuaObject
const
& score_fxns,
127
utility::lua::LuaObject
const
& tasks,
128
protocols::moves::MoverCacheSP
cache );
129
130
virtual
void
parse_def
( utility::lua::LuaObject
const
& def,
131
utility::lua::LuaObject
const
& score_fxns,
132
utility::lua::LuaObject
const
& tasks,
133
protocols::moves::MoverCacheSP
cache );
134
135
/// @brief allow non-const access to the internal minimizer options object
136
virtual
MinimizerOptionsOP
min_options
();
137
/// @brief allow const access to the internal minimizer options object
138
virtual
MinimizerOptionsCOP
min_options
()
const
;
139
140
/// @brief Sets the MoveMap to <movemap_in>
141
/// determines which DOF to minimize
142
///
143
/// example(s):
144
/// minmover.movemap(movemap1)
145
/// See also:
146
/// MinMover
147
/// MinMover.apply
148
/// MinMover.score_function
149
/// MoveMap
150
virtual
void
movemap
(
core::kinematics::MoveMapCOP
movemap_in );
151
virtual
core::kinematics::MoveMapCOP
movemap
()
const
;
152
/// @brief Sets the ScoreFunction to <scorefxn_in>
153
/// determines which function to minimize
154
///
155
/// example(s):
156
/// minmover.score_function(scorefxn)
157
/// See also:
158
/// MinMover
159
/// MinMover.apply
160
/// MinMover.movemap
161
/// ScoreFunction
162
virtual
void
score_function
(
ScoreFunctionCOP
scorefxn_in );
163
virtual
void
score_function
(
core::scoring::ScoreFunction
const
& scorefxn_in );
164
virtual
ScoreFunctionCOP
score_function
()
const
;
165
166
virtual
void
min_type
(
std::string
min_type_in );
167
virtual
void
tolerance
(
Real
tolerance_in );
168
virtual
void
nb_list
(
bool
nb_list_in );
169
virtual
void
deriv_check
(
bool
deriv_check_in );
170
171
Real
tolerance
()
const
;
172
std::string
min_type
()
const
;
173
bool
nb_list
()
const
;
174
bool
deriv_check
()
const
;
175
176
protected
:
177
///@brief for use with RosettaScripts current method of using
178
///TaskOperations to specify residue sets.
179
void
180
apply_dof_tasks_to_movemap
(
181
core::pose::Pose
const
& pose,
182
core::kinematics::MoveMap
&
movemap
)
const
;
183
184
public
:
185
186
// void threshold( Real threshold_in ) { threshold_ = threshold_in; } // TODO: can be deleted?
187
// Real threshold() { return threshold_; } // TODO: can be deleted?
188
189
/// @brief Minimizes the DOFs of <pose_> specified in the MoveMap
190
/// using the ScoreFunction
191
///
192
/// example(s):
193
/// minmover.apply(pose)
194
/// See also:
195
/// MinMover
196
/// MinMover.movemap
197
/// MinMover.score_function
198
virtual
void
apply
(
core::pose::Pose
& pose_ );
199
virtual
std::string
get_name
()
const
;
200
201
inline
void
cartesian
(
bool
newval ) {
cartesian_
= newval; }
202
inline
bool
cartesian
( )
const
{
return
cartesian_
; }
203
204
private
:
205
// data
206
core::kinematics::MoveMapOP
movemap_
;
207
ScoreFunctionCOP
scorefxn_
;
208
MinimizerOptionsOP
min_options_
;
209
Real
threshold_
;
210
bool
cartesian_
;
211
212
///@detail Until ResidueSubsetOperations are implemented,
213
///RosettaScripts uses TaskOperations as a generic way to specify
214
///sets of residues, so it is necessary to have a method of
215
///controling a movemap from a set of task operations. This is not
216
///suppose to be a general interface for MinMover, so only expose it
217
///through the parse_my_tag. Another small complication is that
218
///TaskOperations must be defined in the context of a pose, so hang
219
///on to it here until the apply. In case MinMover is applied
220
///multiple times, to avoid accumulating state, reset the move map
221
///to before the task operations were applied at the end of apply.
222
223
DOF_TaskMap
dof_tasks_
;
224
};
225
226
std::ostream &
operator<<
(std::ostream &os,
MinMover
const
&mover);
227
228
}
// moves
229
}
// rosetta
230
#endif
Generated on Sat Jun 1 2013 12:16:07 for Rosetta 3.5 by
1.8.4