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
protein_interface_design
movers
SpinMover.cc
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/protein_interface_design/movers/SpinMover
11
/// @author Eva-Maria Strauch ( evas01@u.washinigton.edu )
12
13
//unit header
14
#include <
protocols/protein_interface_design/movers/SpinMover.hh
>
15
#include <
protocols/protein_interface_design/movers/SpinMoverCreator.hh
>
16
//project header
17
#include <
core/conformation/Conformation.hh
>
18
#include <
core/conformation/Residue.hh
>
19
#include <
core/pose/Pose.hh
>
20
#include <
core/kinematics/FoldTree.hh
>
21
#include <
core/kinematics/Stub.hh
>
22
#include <
core/kinematics/Jump.hh
>
23
#include <
core/conformation/Conformation.fwd.hh
>
24
#include <numeric/xyzVector.hh>
25
#include <numeric/random/random.hh>
26
#include <string>
27
28
//#include <core/pose/Pose.hh>
29
#include <basic/Tracer.hh>
30
#include <utility/vector0.hh>
31
#include <utility/vector1.hh>
32
#include <utility/tag/Tag.hh>
33
34
35
namespace
protocols {
36
namespace
protein_interface_design {
37
namespace
movers {
38
39
using namespace
protocols::moves;
40
41
static
numeric::random::RandomGenerator
RG
(12454);
// <- Magic number, do not change it!!!
42
static
basic::Tracer
TR
(
"protocols.protein_interface_design.movers.SpinMover"
);
43
44
std::string
SpinMoverCreator::keyname
()
const
45
{
46
return
SpinMoverCreator::mover_name
();
47
}
48
49
protocols::moves::MoverOP
50
SpinMoverCreator::create_mover
()
const
{
51
return
new
SpinMover
;
52
}
53
54
std::string
55
SpinMoverCreator::mover_name
() {
56
return
"SpinMover"
;
57
}
58
59
SpinMover::SpinMover
( ) :
60
protocols::moves::
Mover
(
SpinMoverCreator
::mover_name() )
61
//protocols::moves::Mover ( "SpinMover" )
62
{ }
63
64
SpinMover::SpinMover
(
core::Size
jump_num ) :
65
protocols::moves::
Mover
(
SpinMoverCreator
::mover_name() ),
66
// protocols::moves::Mover ( "SpinMover" ),
67
jump_num_(jump_num)
68
{ }
69
70
std::string
SpinMover::get_name
()
const
{
71
return
SpinMoverCreator::mover_name
();
72
}
73
74
void
75
SpinMover::apply
(
core::pose::Pose
& pose )
76
{
77
core::kinematics::Jump
const
start_jump = pose.
jump
(
jump_num_
);
78
core::kinematics::Jump
curr_jump( start_jump );
79
TR
<<
"current jump: "
<<curr_jump<<std::endl;
80
81
TR
<<
"using fold-tree: "
<< pose.
fold_tree
()<<std::endl;
82
83
//first determine where the jump is
84
core::Size
const
upstream_res(pose.
fold_tree
().
jump_edge
(
jump_num_
).
start
());
85
core::Size
const
downstream_res(pose.
fold_tree
().
jump_edge
(
jump_num_
).
stop
());
86
std::string
upstream_atom(pose.
fold_tree
().
jump_edge
(
jump_num_
).
upstream_atom
());
87
std::string
downstream_atom(pose.
fold_tree
().
jump_edge
(
jump_num_
).
downstream_atom
());
88
if
( upstream_atom ==
""
) upstream_atom =
"C"
;
89
if
( downstream_atom ==
""
) downstream_atom =
"C"
;
90
TR
<<
"upstream residue: "
<<upstream_res<<
" and atom "
<<upstream_atom<<std::endl;
91
92
core::kinematics::Stub
downstream_stub = pose.
conformation
().
upstream_jump_stub
(
jump_num_
);
93
//calculate the rotation axis
94
//looking down the axis from the upstream to downstream atom, positive rotations are counterclockwise
95
core::Vector
axis( pose.
residue
(upstream_res).
atom
(upstream_atom).
xyz
()
//minus
96
- pose.
residue
(downstream_res).
atom
(downstream_atom).
xyz
() );
97
98
99
numeric::xyzVector<double>
reference_center = pose.
residue
(downstream_res).
atom
(downstream_atom).
xyz
();
100
curr_jump.
rotation_by_axis
( downstream_stub, axis, reference_center, 360.0f*
RG
.uniform()
/*degrees*/
);
101
TR
<<
"new jump: "
<< curr_jump<<std::endl;
102
TR
<<
"new fold-tree: "
<< pose.
fold_tree
()<<std::endl;
103
pose.
set_jump
(
jump_num_
, curr_jump );
104
TR
<<
"new jump: "
<< curr_jump<<std::endl;
105
TR
<<
"new fold-tree: "
<< pose.
fold_tree
()<<std::endl;
106
}
107
//mjo commenting out 'data' and 'pose' because they are unused and cause warnings
108
void
109
SpinMover::parse_my_tag
(
TagPtr
const
tag,
DataMap
&
/*data*/
,
protocols::filters::Filters_map
const
&,
Movers_map
const
&,
core::pose::Pose
const
&
/*pose*/
)
110
{
111
jump_num_
= tag->getOption<
core::Size
>(
"jump_num"
, 1);
112
TR
<<
"SpinMover was instantiated "
<<std::endl;
113
}
114
115
116
}
//movers
117
}
//protein_interface_design
118
}
//protocols
Generated on Sat Jun 1 2013 12:07:11 for Rosetta 3.5 by
1.8.4