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
relax
FastRelax.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 src/protocols/relax/FastRelax.hh
11
/// @brief The FastRelax Protocol
12
/// @detailed
13
/// @author Mike Tyka
14
15
16
#ifndef INCLUDED_protocols_relax_FastRelax_hh
17
#define INCLUDED_protocols_relax_FastRelax_hh
18
19
// Unit headers
20
#include <
protocols/relax/FastRelax.fwd.hh
>
21
22
#include <
protocols/relax/RelaxProtocolBase.hh
>
23
#include <
protocols/moves/Mover.hh
>
24
25
#include <
protocols/checkpoint/CheckPointer.hh
>
26
27
#include <
core/kinematics/MoveMap.fwd.hh
>
28
29
#include <
core/pose/Pose.fwd.hh
>
30
31
#include <
core/scoring/ScoreFunction.fwd.hh
>
32
#include <
core/scoring/constraints/ConstraintSet.hh
>
33
34
//// C++ headers
35
#include <string>
36
37
#include <
core/io/silent/silent.fwd.hh
>
38
#include <utility/vector1.hh>
39
40
41
42
namespace
protocols {
43
namespace
relax {
44
45
46
struct
RelaxScriptCommand
{
47
RelaxScriptCommand
(){
48
command
=
""
;
49
param1
=0;
50
param2
=0;
51
param3
=0;
52
param4
=0;
53
nparams
=0;
54
}
55
std::string
command
;
56
core::Real
param1
;
57
core::Real
param2
;
58
core::Real
param3
;
59
core::Real
param4
;
60
core::Size
nparams
;
61
};
62
63
class
FastRelax
:
public
RelaxProtocolBase
{
64
public
:
65
66
/// @brief Initialize FastRelax with a specific script file, which encodes the script of steps
67
/// the is to be applied
68
FastRelax
(
69
core::Size
standard_repeats = 0
70
);
71
72
/// @brief Initialize FastRelax using the default script with a varying number of rounds,
73
/// defined by the standard_repeats repeats paramter. By default, 5.
74
FastRelax
(
75
core::scoring::ScoreFunctionOP
scorefxn_in,
76
core::Size
standard_repeats = 0
77
);
78
79
/// @brief Initialize FastRelax with a specific script file, which encodes the script of steps
80
/// the is to be applied
81
FastRelax
(
82
core::scoring::ScoreFunctionOP
scorefxn_in,
83
std::string
const
& script_file
84
);
85
86
/// @brief Initialize FastRelax with a specific script file, and allows fastrelax to only use a subset of the number of stages in the scriptfile.
87
FastRelax
(
88
core::scoring::ScoreFunctionOP
scorefxn_in,
89
core::Size
standard_repeats,
90
const
std::string
& script_file
91
);
92
/// @brief Override the stored script with the default script for batchrelax
93
/// Ignores '-default_repeat' value
94
void
set_script_to_batchrelax_default
(
95
core::Size
standard_repeats = 0
96
);
97
98
/// @brief Force us to batchrelax with nonideal geometry (using additional memory)
99
void
set_force_nonideal
(
bool
val ) {
force_nonideal_
= val; }
100
101
/// @brief virtual constructor to allow derivation
102
virtual
~FastRelax
();
103
104
/// @brief Parses the FastRelaxTags
105
void
parse_my_tag
(
106
utility::tag::TagPtr
const
tag,
107
protocols::moves::DataMap
& data,
108
protocols::filters::Filters_map
const
&,
109
protocols::moves::Movers_map
const
&,
110
core::pose::Pose
const
&
111
);
112
113
virtual
void
parse_def
( utility::lua::LuaObject
const
& def,
114
utility::lua::LuaObject
const
& score_fxns,
115
utility::lua::LuaObject
const
& tasks,
116
protocols::moves::MoverCacheSP
cache );
117
118
/// @brief Initializes class using option system. This is called by the constructors
119
void
set_to_default
();
120
121
/// @brief Return the name of this mover.
122
virtual
std::string
get_name
()
const
;
123
124
/// @brief return a fresh instance of this class in an owning pointer
125
virtual
protocols::moves::MoverOP
clone
()
const
;
126
127
/// @brief Apply the FastRelax. Overloaded apply function from mover base class.
128
virtual
void
apply
(
core::pose::Pose
& pose );
129
130
/// @brief sets the movemap to not allow DNA to move during relax.
131
132
void
makeDnaRigid
(
core::pose::Pose
& pose,
core::kinematics::MoveMapOP
mm );
133
134
135
/// @brief Batch Relax, a new even faster way to relax entire batches of structures.
136
void
batch_apply
(
137
std::vector < core::io::silent::SilentStructOP > & input_structs,
138
core::scoring::constraints::ConstraintSetOP
input_csts = NULL,
139
core::Real
decay_rate = 0.5 );
140
141
protected
:
142
143
void
cmd_accept_to_best
(
144
const
core::scoring::ScoreFunctionOP
local_scorefxn,
145
core::pose::Pose
&pose,
146
core::pose::Pose
&best_pose,
147
const
core::pose::Pose
&start_pose,
148
core::Real
&best_score,
149
core::Size
&accept_count
150
);
151
152
void
do_minimize
(
153
core::pose::Pose
&pose,
154
core::Real
tolerance,
155
core::kinematics::MoveMapOP
local_movemap,
156
core::scoring::ScoreFunctionOP
local_scorefxn
157
);
158
159
private
:
160
161
void
read_script_file
(
const
std::string
&script_file,
core::Size
standard_repeats = 5 );
162
163
private
:
// options
164
165
/// @brief Number of repeats if using default script
166
core::Size
default_repeats_
;
167
168
/// @brief Apply Ramady(tm) fix to residues with bad rama scores ?
169
bool
ramady_
;
170
171
/// @brief Number of bad ramas to fix per call to 'fix_worst_bad_ramas'
172
core::Size
ramady_num_rebuild_
;
173
174
/// @brief Reject ramady changes perturbing structure more than this amount
175
core::Real
ramady_rms_limit_
;
176
177
/// @brief Cutoff for calling a rama 'bad'
178
core::Real
ramady_cutoff_
;
179
180
/// @brief Force ramady to be run (normally skip rate of 10%)
181
bool
ramady_force_
;
182
183
/// @brief Allow Chi angles to move ?
184
bool
repack_
;
185
186
/// @brief Do only a few test_cycles ?
187
bool
test_cycles_
;
188
189
/// @brief [batch mode only] force structures to be nonideal? Default uses -out:silent_struct_type to decide
190
bool
force_nonideal_
;
191
192
/// @brief Dump pdb after repack, min, or ramp_repack_min?
193
bool
dumpall_
;
194
195
/// @brief Quit after this many accepts ?// limits themaximum number of accepts, default is 1000000
196
core::Size
script_max_accept_
;
197
198
/// @brief Do a symmetric RMSD calculation rather then a monomeric one.
199
bool
symmetric_rmsd_
;
200
201
private
:
// other data
202
203
protocols::checkpoint::CheckPointer
checkpoints_
;
204
205
std::vector <RelaxScriptCommand>
script_
;
206
utility::tag::TagPtr
movemap_tag_
;
// this cannot be parsed before apply b/c the fold tree is likely to change during a run
207
};
208
209
210
211
212
}
213
}
// protocols
214
215
#endif
Generated on Sat Jun 1 2013 12:08:54 for Rosetta 3.5 by
1.8.4