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
BiasedFragmentMover.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/BiasedFragmentMover.hh
11
/// @author Christopher Miles (cmiles@uw.edu)
12
13
#ifndef INCLUDED_PROTOCOLS_NONLOCAL_BIASEDFRAGMENTMOVER_HH
14
#define INCLUDED_PROTOCOLS_NONLOCAL_BIASEDFRAGMENTMOVER_HH
15
16
// Unit header
17
#include <
protocols/nonlocal/BiasedFragmentMover.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/fragment/FragData.hh
>
30
#include <
core/fragment/FragSet.hh
>
31
#include <
core/fragment/Frame.hh
>
32
#include <
core/kinematics/FoldTree.fwd.hh
>
33
#include <
core/kinematics/MoveMap.hh
>
34
#include <
core/pose/Pose.fwd.hh
>
35
#include <
protocols/moves/Mover.hh
>
36
37
// Package headers
38
#include <
protocols/nonlocal/Policy.hh
>
39
40
namespace
protocols {
41
namespace
nonlocal {
42
43
/// @class A kinematically-aware mover for performing fragment insertion.
44
/// User-specified, per-residue sampling probabilities allow fine grained
45
/// control over the simulation.
46
class
BiasedFragmentMover
:
public
protocols::moves::Mover
{
47
typedef
boost::unordered_map<unsigned, core::fragment::Frame>
FrameMap
;
48
typedef
core::fragment::FragSetCOP
FragSetCOP
;
49
typedef
utility::vector1<double>
Probabilities
;
50
51
public
:
52
/// @brief Creates a new BiasedFragmentMover that selects uniformly from the
53
/// available fragments at the selected insertion position.
54
BiasedFragmentMover
(
const
PolicyOP
& policy,
const
Probabilities
& probs);
55
56
~BiasedFragmentMover
() {}
57
58
/// @brief Inserts a single fragment into pose.
59
///
60
/// Insertion position is chosen in a biased manner using the per-residue
61
/// probabilities provided in the constructor. The decision on which fragment
62
/// to insert from the fragment library is delegated to the policy specified
63
/// in the constructor.
64
///
65
/// Respects the underlying kinematics of the system.
66
void
apply
(
core::pose::Pose
& pose);
67
68
/// @brief Returns the name of this mover
69
std::string
get_name
()
const
;
70
71
private
:
72
/// @brief Creates a position-indexable list of Frames
73
void
initialize_library
();
74
75
/// @brief Generates cdf from pdf
76
void
initialize_probabilities
();
77
78
/// @brief Verifies that the probability of selecting invalid positions is 0
79
void
verify_probabilities_or_die
(
const
core::kinematics::FoldTree
& tree)
const
;
80
81
/// @brief Returns a randomly chosen position according to the input probabilities
82
unsigned
random_position
()
const
;
83
84
85
// -- Members --
86
87
/// @brief Avoid creating a useless MoveMap for each call to Frame::apply().
88
core::kinematics::MoveMap
movable_
;
89
90
/// @brief Fragment library
91
FragSetCOP
fragments_
;
92
93
/// @brief Position-indexable Frame lookup
94
FrameMap
frames_
;
95
96
/// @brief Guidance for selecting the fragment to be inserted at a given position
97
PolicyOP
policy_
;
98
99
/// @brief PDF of residue sampling probabilities. Must remain in sync with cdf_.
100
Probabilities
pdf_
;
101
102
/// @brief CDF of residue sampling probabilities. Must remain in sync with pdf_.
103
Probabilities
cdf_
;
104
};
105
106
}
// namespace nonlocal
107
}
// namespace protocols
108
109
#endif // PROTOCOLS_NONLOCAL_BIASED_FRAGMENT_MOVER_HH_
Generated on Sat Jun 1 2013 12:01:42 for Rosetta 3.5 by
1.8.4