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
nonlocal
SingleFragmentMover.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/nonlocal/SingleFragmentMover.hh
11
/// @author Christopher Miles (cmiles@uw.edu)
12
13
#ifndef INCLUDED_PROTOCOLS_NONLOCAL_SINGLEFRAGMENTMOVER_HH
14
#define INCLUDED_PROTOCOLS_NONLOCAL_SINGLEFRAGMENTMOVER_HH
15
16
// Unit header
17
#include <
protocols/nonlocal/SingleFragmentMover.fwd.hh
>
18
19
// C/C++ headers
20
#include <string>
21
22
// External headers
23
#include <boost/unordered/unordered_map.hpp>
24
25
// Utility headers
26
#include <utility/vector1.hh>
27
28
// Project headers
29
#include <
core/types.hh
>
30
#include <
core/fragment/FragData.hh
>
31
#include <
core/fragment/FragSet.fwd.hh
>
32
#include <
core/fragment/Frame.hh
>
33
#include <
core/kinematics/FoldTree.hh
>
34
#include <
core/kinematics/MoveMap.fwd.hh
>
35
#include <
core/pose/Pose.fwd.hh
>
36
#include <
protocols/moves/DataMap.fwd.hh
>
37
#include <
protocols/moves/Mover.hh
>
38
39
// Package headers
40
#include <
protocols/nonlocal/Chunk.hh
>
41
#include <
protocols/nonlocal/Policy.hh
>
42
43
namespace
protocols {
44
namespace
nonlocal {
45
46
class
SingleFragmentMover
:
public
protocols::moves::Mover
{
47
typedef
core::Real
Real
;
48
typedef
core::Size
Size
;
49
typedef
core::fragment::FragSetOP
FragSetOP
;
50
typedef
core::fragment::Frame
Frame
;
51
typedef
core::kinematics::FoldTree
FoldTree
;
52
typedef
core::kinematics::FoldTreeOP
FoldTreeOP
;
53
typedef
core::kinematics::MoveMapOP
MoveMapOP
;
54
typedef
core::pose::Pose
Pose
;
55
typedef
protocols::moves::Mover
Mover
;
56
typedef
protocols::moves::MoverOP
MoverOP
;
57
58
typedef
boost::unordered_map<Size, Frame>
FrameMap
;
59
typedef
utility::vector1<Chunk>
Chunks
;
60
61
public
:
62
/// @brief No-argument constructor required by RosettaScripts. The caller is
63
/// responsible for initializing the instance
64
SingleFragmentMover
();
65
66
/// @brief Creates a new SingleFragmentMover that selects uniformly from the
67
/// available fragments at the selected insertion position.
68
SingleFragmentMover
(
const
FragSetOP
& fragments,
69
const
MoveMapOP
& movable);
70
71
/// @brief Creates a new SingleFragmentMover that selects fragments at the
72
/// selected insertion position using the given policy.
73
SingleFragmentMover
(
const
FragSetOP
& fragments,
74
const
MoveMapOP
& movable,
75
const
PolicyOP
& policy);
76
77
~SingleFragmentMover
() {}
78
79
/// @brief Performs a single fragment insertion on <pose>, drawn from the set
80
/// of fragments specified in the constructor. Respects the underlying
81
/// kinematics of the system, as determined by the Pose's FoldTree and the
82
/// user-specified MoveMap. Fragment insertions will only occur in allowable
83
/// regions of the pose. No moves will span jumps in the FoldTree.
84
///
85
/// Assumptions:
86
/// - <pose> has been instantiated (i.e. constructed from sequence or an
87
/// alternate source) elsewhere
88
/// - <pose>'s FoldTree is valid
89
/// - <pose> is centroid-level (warning if full-atom)
90
/// - The combination of FoldTree and MoveMap provide an unambiguous
91
/// definition of what's movable and what's not
92
void
apply
(
Pose
& pose);
93
94
/// @brief Returns the name of this mover
95
std::string
get_name
()
const
;
96
97
/// @brief Creates a new instance using the copy constructor
98
virtual
MoverOP
clone
()
const
;
99
100
/// @brief Creates a new instance using the default constructor
101
virtual
MoverOP
fresh_instance
()
const
;
102
103
/// @brief Mover-specific parsing required by RosettaScripts
104
void
parse_my_tag
(
const
utility::tag::TagPtr
tag,
105
protocols::moves::DataMap
& data,
106
const
protocols::filters::Filters_map
& filters,
107
const
protocols::moves::Movers_map
& movers,
108
const
Pose
& pose);
109
110
/// @brief Mover-specific parsing required by ElScripts
111
void
parse_def
( utility::lua::LuaObject
const
& def,
112
utility::lua::LuaObject
const
& score_fxns,
113
utility::lua::LuaObject
const
& tasks,
114
protocols::moves::MoverCacheSP
cache );
115
116
/// @brief Returns true if this instance is in a usable state, false otherwise
117
bool
valid
()
const
;
118
119
120
private
:
121
void
initialize
(
const
FragSetOP
& fragments,
122
const
MoveMapOP
& movable,
123
const
PolicyOP
& policy);
124
125
/// @brief Creates a position-indexable list of Frames
126
void
initialize_library
();
127
128
/// @brief Creates a set of chunks by examining the stored MoveMap and FragSet
129
/// in conjunction with <tree>
130
void
initialize_chunks
(
const
FoldTree
& tree);
131
132
/// @brief Returns a randomly chosen chunk with uniform probability
133
const
Chunk
*
random_chunk
()
const
;
134
135
/// @brief If <pose> is fullatom, converts it to centroid and returns true.
136
/// Otherwise, takes no action and returns false.
137
bool
to_centroid
(
Pose
* pose)
const
;
138
139
140
/// @brief The set of fragments to apply to the pose
141
FragSetOP
fragments_
;
142
143
/// @brief Defines restrictions on which degrees of freedom in the system can
144
/// be modified.
145
MoveMapOP
movable_
;
146
147
/// @brief Selects the fragment to be inserted at <insertion_pos> given
148
/// knowledge of the fragment library and the current state of the pose.
149
PolicyOP
policy_
;
150
151
/// @brief FoldTree used to initialize <chunks_> in a previous call to apply()
152
FoldTreeOP
previous_tree_
;
153
154
/// @brief Provides index-based access to the data contained in the FragSet
155
FrameMap
library_
;
156
157
/// @brief Regions of sequence on which to perform fragment insertion
158
Chunks
chunks_
;
159
160
/// @brief Probability of selecting chunk c_i. Proportional to chunk length.
161
utility::vector1<Real>
probs_
;
162
};
163
164
}
// namespace nonlocal
165
}
// namespace protocols
166
167
#endif // PROTOCOLS_NONLOCAL_SINGLEFRAGMENTMOVER_HH_
Generated on Sat Jun 1 2013 12:01:44 for Rosetta 3.5 by
1.8.4