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
BBGaussianMover.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
// :noTabs=false:tabSize=4:indentSize=4:
4
//
5
// (c) Copyright Rosetta Commons Member Institutions.
6
// (c) This file is part of the Rosetta software suite and is made available under license.
7
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
8
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
9
// (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
10
11
/// @file protocols/simple_moves/BBGaussianMover.fwd.hh
12
/// @brief Gaussian Perturbation to backbone
13
/// @author Yuan Liu (wendao@u.washington.edu)
14
15
#ifndef INCLUDED_protocols_simple_moves_BBGaussianMover_hh
16
#define INCLUDED_protocols_simple_moves_BBGaussianMover_hh
17
18
#include <
protocols/simple_moves/BBGaussianMover.fwd.hh
>
19
//core
20
#include <
core/types.hh
>
21
#include <
core/pose/Pose.fwd.hh
>
22
// AUTO-REMOVED #include <core/conformation/Residue.hh>
23
//protocols
24
#include <
protocols/moves/Mover.hh
>
25
//movemap
26
#include <
core/kinematics/MoveMap.fwd.hh
>
27
//
28
#include <utility/vector1.hh>
29
30
//std
31
#include <string>
32
33
#include <
core/conformation/Residue.fwd.hh
>
34
#include <numeric/xyzVector.hh>
35
36
37
using namespace
std;
38
39
namespace
protocols {
40
namespace
simple_moves {
41
42
/// @brief the basic class for implementing Gaussian Perturbation of bb
43
/// @note "Monte Carlo update for chain molecules: Biased Gaussian steps in torsional space"
44
/// "The Journal of Chemical Physics, Vol. 114, No. 18. (2001), pp. 8154-8158."
45
/// Two steps for perturbing the backbone and keeping the geometry constrain
46
/// Step 1: Gaussian Biased steps in torsional space:
47
/// the end atoms of the moving segment should be choosen by user
48
/// and to keep the geometry constrain(6), the DOF of the moving segment > 6
49
/// Step 2: "pivot" update the bb conformation, or followed by a chainclosure method (BBConRot)
50
class
BBGaussianMover
:
public
moves::Mover
51
{
52
public
:
53
typedef
core::Vector
Vector
;
54
typedef
core::Real
Real
;
55
typedef
core::Size
Size
;
56
typedef
core::pose::Pose
Pose
;
57
typedef
core::pose::PoseOP
PoseOP
;
58
typedef
core::pose::PoseCOP
PoseCOP
;
59
typedef
core::conformation::Residue
Residue
;
60
typedef
utility::vector1< Vector >
VdRdPhi
;
61
typedef
utility::vector1< VdRdPhi >
VMatrix
;
62
typedef
utility::vector1< utility::vector1<Real>
>
Matrix
;
63
typedef
numeric::xyzMatrix<Real>
xyzMatrix
;
64
65
public
:
66
BBGaussianMover
(
Size
,
Size
,
Size
);
67
~
BBGaussianMover
();
68
69
//go through all the residue, count how many movable residue passed
70
//count > n_pert_res (depends on the n_dof_angle)
71
//stop by frozen res and cut point
72
//TODO: apply smallmover to the end segment if their length is not
73
//satisfy the n_pert_res_, dof: L-(n-1) => L+(n+1)
74
75
core::kinematics::MoveMapCOP
movemap();
76
void
movemap(
core::kinematics::MoveMapCOP
new_movemap);
77
78
using
moves::Mover::last_proposal_density_ratio;
79
80
/// @brief get the ratio of proposal densities for the last move
81
Real
last_proposal_density_ratio()
const
;
82
83
protected
:
84
void
setup_list(
Pose
const
&);
85
//r1, r2, r: r rotate around axis r1->r2
86
Vector
get_dRdPhi
(
Vector
const
&r1,
Vector
const
&r2,
Vector
const
&r)
87
{
88
//dr/dphi = r x axis
89
Vector
axis((r2-r1).normalize());
90
Vector
r_local(r-r1);
91
return
r_local.cross(axis);
92
}
93
94
//r1, r2, r3, r: r rotate around axis (r3-r2)x(r2xr1)
95
Vector
get_dRdTheta
(
Vector
const
&r1,
Vector
const
&r2,
Vector
const
&r3,
Vector
const
&r)
96
{
97
Vector
axis((r3-r2).cross(r2-r1).normalize());
98
Vector
r_local(r-r2);
99
return
r_local.cross(axis);
100
}
101
102
//interface
103
virtual
void
get_VdRdPhi(
Pose
const
&)=0;
104
virtual
void
get_G()=0;
105
virtual
void
get_A
()=0;
106
//calculate the L matrix and update pose
107
virtual
Real
get_L_move(
Pose
&)=0;
108
//calculate the L', update last_proposal_density
109
virtual
Real
get_L_prime()=0;
110
111
//foreward
112
Real
cholesky_fw(
Matrix
&,
Size
,
utility::vector1<Real>
&,
utility::vector1<Real>
&,
Size
from=1,
Size
to=0,
Real
scale=1.0);
113
//backward
114
Real
cholesky_bw(
Matrix
&,
Size
,
utility::vector1<Real>
&,
utility::vector1<Real>
&,
Size
from=1,
Size
to=0,
Real
scale=1.0);
115
116
void
pivot_range_randomly(
Pose
&,
Size
,
Size
);
117
118
protected
:
119
Size
n_end_atom_
;
120
Size
n_dof_angle_
;
121
Size
n_pert_res_
;
122
Size
resnum_
;
123
//utility::vector1< Size > available_res_list_;
124
utility::vector1< std::pair<Size,Size>
>
available_seg_list_
;
125
/// @note {dr/dphi_i * dr/dphi_j} -- n_dof_angle^2
126
Matrix
matrix_G
;
127
/// @note perturbation from G
128
Matrix
matrix_A
;
129
/// @note {dr_i/dphi_j} -- n_dof_angle*n_end_atom
130
VMatrix
matrix_dRdPhi
;
131
132
//to avoid -0.0
133
//static const Real ZERO;
134
135
// proposal density ratio
136
Real
last_proposal_density_ratio_
;
137
138
//movemap
139
core::kinematics::MoveMapCOP
movemap_
;
140
};
141
142
/// @brief a particular gaussian mover from the original paper
143
/// @note using 8 torsion angles as DOF, 3 atoms (Ca,C,O) as end
144
class
BBG8T3AMover
:
public
BBGaussianMover
145
{
146
public
:
147
148
149
public
:
150
BBG8T3AMover
();
151
~
BBG8T3AMover
();
152
153
154
//static void register_options();
155
156
void
apply(
Pose
&);
157
virtual
std::string
get_name()
const
;
158
void
factorA(
core::Real
const
fA );
159
void
factorB(
core::Real
const
fB );
160
//Real get_last_delta_square();
161
162
protected
:
163
void
get_VdRdPhi(
Pose
const
&);
164
void
get_G();
165
void
get_A
();
166
167
Real
get_L_move(
Pose
&);
168
Real
get_L_prime();
169
170
private
:
171
utility::vector1< string >
end_atom_list_
;
172
utility::vector1< Real >
dphi
;
173
Real
factorA_
;
174
Real
factorB_
;
175
Real
last_delta_square_
;
176
};
177
178
}
//namespace simple_moves
179
}
//namespace protocols
180
181
#endif
182
Generated on Sat Jun 1 2013 12:15:14 for Rosetta 3.5 by
1.8.4