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
rational_mc
RationalMonteCarlo.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/simple_moves/rational_mc/RationalMonteCarlo.hh
11
/// @author Christopher Miles (cmiles@uw.edu)
12
13
#ifndef INCLUDED_protocols_simple_moves_rational_mc_RationalMonteCarlo_HH
14
#define INCLUDED_protocols_simple_moves_rational_mc_RationalMonteCarlo_HH
15
16
// Unit header
17
#include <
protocols/simple_moves/rational_mc/RationalMonteCarlo.fwd.hh
>
18
19
// C/C++ headers
20
#include <string>
21
22
// External headers
23
#include <boost/function.hpp>
24
#include <boost/unordered/unordered_map.hpp>
25
26
// Project headers
27
#include <
core/types.hh
>
28
#include <
core/pose/Pose.fwd.hh
>
29
#include <
core/scoring/ScoreFunction.fwd.hh
>
30
31
// Package headers
32
#include <
protocols/moves/MonteCarlo.hh
>
33
#include <
protocols/moves/Mover.hh
>
34
35
namespace
protocols {
36
namespace
simple_moves {
37
namespace
rational_mc {
38
39
/// @brief Trigger API definition
40
typedef
boost::function<void(const core::pose::Pose&)>
RationalMonteCarloTrigger
;
41
typedef
boost::unordered_map<core::Size, RationalMonteCarloTrigger>
Triggers
;
42
43
/// @class Trial-based Monte Carlo minization primitive. Do not modify this
44
/// class; almost anything you could possibly want to add is a bad idea.
45
class
RationalMonteCarlo
:
public
protocols::moves::Mover
{
46
typedef
core::pose::Pose
Pose
;
47
typedef
core::scoring::ScoreFunctionOP
ScoreFunctionOP
;
48
49
public
:
50
RationalMonteCarlo
(
moves::MoverOP
mover
,
51
ScoreFunctionOP
score,
52
core::Size
num_trials
,
53
core::Real
temperature
,
54
bool
recover_low
);
55
56
/// @brief Applies the underlying mover to <pose> the specified number of times
57
void
apply
(
Pose
& pose);
58
59
/// @brief Returns this mover's name
60
std::string
get_name
()
const
;
61
62
// -- Accessors -- //
63
bool
recover_low
()
const
;
64
moves::MoverOP
mover
()
const
;
65
core::Size
num_trials
()
const
;
66
core::Real
temperature
()
const
;
67
const
core::scoring::ScoreFunction
&
score_function
()
const
;
68
69
/// @brief Updates the last accepted and lowest scoring pose members of the
70
/// MonteCarlo member variable to the score of the specified pose
71
void
reset
(
const
core::pose::Pose
& pose);
72
const
core::pose::Pose
&
lowest_score_pose
()
const
;
73
const
core::pose::Pose
&
last_accepted_pose
()
const
;
74
75
// -- Mutators -- //
76
void
set_mover
(
moves::MoverOP
mover
);
77
void
set_recover_low
(
bool
recover_low
);
78
void
set_num_trials
(
core::Size
num_trials
);
79
void
set_temperature
(
core::Real
temperature
);
80
81
void
enable_autotemp
(
core::Real
quench);
82
void
disable_autotemp
();
83
84
/// @brief Updates the score function. Before calling this method, make sure
85
/// that apply() has been called at least once on a non-empty pose.
86
void
set_score_function
(
core::scoring::ScoreFunctionOP
score);
87
88
// -- Triggers -- //
89
90
/// @brief Registers the specified trigger with this instance. Returns a unique
91
/// identifier for referring to this trigger in subsequent operations.
92
core::Size
add_trigger
(
const
RationalMonteCarloTrigger
& trigger);
93
94
/// @brief Unregisters the trigger with the given unique identifier
95
void
remove_trigger
(
core::Size
trigger_id);
96
97
protected
:
98
/// @brief Executes all triggers attached to this instance. The order of trigger
99
/// execution is undefined. Do not assume, depend, or in any way rely upon a
100
/// partiular ordering.
101
void
fire_all_triggers
(
const
Pose
& pose);
102
103
private
:
104
/// @brief Underlying mover
105
moves::MoverOP
mover_
;
106
107
/// @brief Determines whether applications of the base mover should be accepted
108
/// by applying the Metropolis criterion to the pose
109
moves::MonteCarloOP
mc_
;
110
111
/// @brief Number of times to execute the underlying mover in calls to apply()
112
core::Size
num_trials_
;
113
114
/// @brief Determines whether the low scoring pose should be recovered at the
115
/// conclusion of the apply() method
116
bool
recover_low_
;
117
118
/// @brief Collection of function callbacks
119
Triggers
triggers_
;
120
121
/// @brief Next trigger id to be assigned
122
core::Size
next_trigger_id_
;
123
};
124
125
}
// namespace rational_mc
126
}
// namespace simple_moves
127
}
// namespace protocols
128
129
#endif // protocols_simple_moves_rational_mc_RationalMonteCarlo_HH_
Generated on Sat Jun 1 2013 12:16:40 for Rosetta 3.5 by
1.8.4