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
canonical_sampling
MetropolisHastingsMover.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 /protocols/canonical_sampling/MetropolisHastingsMover.hh
11
/// @brief
12
/// @author
13
14
#ifndef INCLUDED_protocols_canonical_sampling_MetropolisHastingsMover_hh
15
#define INCLUDED_protocols_canonical_sampling_MetropolisHastingsMover_hh
16
17
// Unit Headers
18
#include <
protocols/canonical_sampling/MetropolisHastingsMover.fwd.hh
>
19
#include <
protocols/moves/Mover.hh
>
20
#include <
protocols/canonical_sampling/TemperatureController.hh
>
21
22
// Project Headers
23
#include <
protocols/moves/MonteCarlo.fwd.hh
>
24
#include <
core/pose/Pose.fwd.hh
>
25
#include <numeric/random/WeightedSampler.hh>
26
27
// Utility Headers
28
#include <
core/types.hh
>
29
#include <utility/vector0.hh>
30
#include <utility/vector1.hh>
31
32
#include <
protocols/canonical_sampling/ThermodynamicMover.fwd.hh
>
33
#include <
protocols/canonical_sampling/ThermodynamicObserver.fwd.hh
>
34
35
#ifdef WIN32
36
#include <
protocols/canonical_sampling/ThermodynamicMover.hh
>
37
#include <
protocols/canonical_sampling/ThermodynamicObserver.hh
>
38
#endif
39
40
41
namespace
protocols {
42
namespace
canonical_sampling {
43
44
///@details
45
class
MetropolisHastingsMover
:
public
protocols::moves::Mover
{
46
47
public
:
48
49
MetropolisHastingsMover
();
50
51
MetropolisHastingsMover
(
52
MetropolisHastingsMover
const
& metropolis_hastings_mover
53
);
54
55
virtual
56
~MetropolisHastingsMover
();
57
58
virtual
59
void
60
apply
(
core::pose::Pose
& pose );
61
62
virtual
63
std::string
64
get_name
()
const
;
65
66
protocols::moves::MoverOP
67
clone
()
const
;
68
69
virtual
70
protocols::moves::MoverOP
71
fresh_instance
()
const
;
72
73
virtual
74
bool
75
reinitialize_for_each_job
()
const
;
76
77
virtual
78
bool
79
reinitialize_for_new_input
()
const
;
80
81
virtual
82
void
83
parse_my_tag
(
84
utility::tag::TagPtr
const
tag,
85
protocols::moves::DataMap
& data,
86
protocols::filters::Filters_map
const
& filters,
87
protocols::moves::Movers_map
const
& movers,
88
core::pose::Pose
const
& pose
89
);
90
91
protocols::moves::MonteCarloCOP
92
monte_carlo
()
const
;
93
94
void
95
set_monte_carlo
(
96
protocols::moves::MonteCarloOP
monte_carlo
97
);
98
99
void
100
set_tempering
(
101
TemperatureControllerOP
102
);
103
104
TemperatureControllerCOP
105
tempering
()
const
;
106
107
core::Size
108
ntrials
()
const
{
return
ntrials_
; }
109
110
void
111
set_ntrials
(
112
core::Size
ntrials
113
);
114
115
std::string
const
&
116
output_name
()
const
;
117
118
void
119
set_output_name
(
120
std::string
const
&
output_name
121
);
122
123
std::string
124
output_file_name
(
125
std::string
const
& suffix,
126
bool
cumulate_jobs =
false
,
127
bool
cumulate_replicas =
false
128
)
const
;
129
130
bool
131
finished
()
const
;
132
133
virtual
134
ThermodynamicMoverOP
135
random_mover
();
136
137
virtual
138
void
139
add_mover
(
140
ThermodynamicMoverOP
mover,
141
core::Real
weight,
142
utility::tag::TagPtr
const
& subtag
143
);
144
145
virtual
void
146
add_mover
(
147
ThermodynamicMoverOP
mover,
148
core::Real
weight
149
);
150
151
void
152
add_backrub_mover
(
153
core::Real
weight
154
);
155
156
void
157
add_small_mover
(
158
core::Real
weight
159
);
160
161
void
162
add_shear_mover
(
163
core::Real
weight
164
);
165
166
void
167
add_sidechain_mover
(
168
core::Real
weight,
169
core::Real
prob_uniform,
170
core::Real
prob_withinrot,
171
bool
preserve_cbeta
172
);
173
174
void
175
add_sidechain_mc_mover
(
176
core::Real
weight,
177
core::Real
prob_uniform,
178
core::Real
prob_withinrot,
179
bool
preserve_cbeta,
180
core::Size
ntrials
181
);
182
183
void
184
add_observer
(
185
ThermodynamicObserverOP
observer
186
);
187
188
ThermodynamicMover
const
&
189
last_move
()
const
;
190
191
bool
192
last_accepted
()
const
{
193
return
last_accepted_
;
194
}
195
196
protected
:
197
198
TemperatureControllerOP
const
&
199
tempering
() {
return
tempering_
; }
200
201
ThermodynamicMoverOP
202
mover_by_index
(
numeric::Size
idx)
const
203
{
204
return
movers_
[idx];
205
}
206
207
void
wind_down_simulation
(
core::pose::Pose
& pose);
208
209
//initialize all movers
210
//return cycle number if a restart, 0 otherwise
211
core::Size
prepare_simulation
(
core::pose::Pose
& pose);
212
213
void
set_last_accepted
(
bool
setting ) {
214
last_accepted_
= setting;
215
}
216
217
void
set_last_move
(
ThermodynamicMoverOP
setting );
218
219
typedef
utility::vector1< ThermodynamicObserverOP >
ObserverList
;
220
ObserverList
const
&
observers
() {
return
observers_
; }
221
222
protocols::moves::MonteCarlo
&
nonconst_monte_carlo
();
223
private
:
224
225
///configurables...
226
protocols::moves::MonteCarloOP
monte_carlo_
;
227
core::Size
ntrials_
;
228
std::string
output_name_
;
229
utility::vector1< ThermodynamicMoverOP >
movers_
;
230
utility::vector1< ThermodynamicObserverOP >
observers_
;
231
TemperatureControllerOP
tempering_
;
232
233
//helper
234
numeric::random::WeightedSampler
weighted_sampler_
;
235
236
///some status is necessary for the observers
237
ThermodynamicMoverOP
last_move_
;
238
bool
last_accepted_
;
239
core::Size
trial_
;
240
241
//internal book keeping
242
bool
output_name_from_job_distributor_
;
243
244
};
//end MetropolisHastingsMover
245
246
}
//namespace canonical_sampling
247
}
//namespace protocols
248
249
#endif //INCLUDED_protocols_canonical_sampling_MetropolisHastingsMover_HH
Generated on Sat Jun 1 2013 11:44:31 for Rosetta 3.5 by
1.8.4