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
surface_docking
CentroidRelaxMover.cc
Go to the documentation of this file.
1
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;
2
// rm-trailing-spaces:t -*-
3
// vi: set ts=2 noet:
4
//
5
// (c) Copyright Rosetta Commons Member Institutions.
6
// (c) This file is part of the Rosetta software suite and is made available
7
// under license.
8
// (c) The Rosetta software is developed by the contributing members of the
9
// Rosetta Commons.
10
// (c) For more information, see http://www.rosettacommons.org. Questions about
11
// this can be
12
// (c) addressed to University of Washington UW TechTransfer,
13
// email: license@u.washington.edu.
14
15
/// @file CentroidRelaxMover.cc
16
/// @author Robin A Thottungal (rathottungal@gmail.com)
17
18
// Unit Headers
19
#include <
protocols/surface_docking/CentroidRelaxMover.hh
>
20
21
// Package Headers
22
23
// Project headers
24
#include <
core/pose/Pose.hh
>
25
#include <
protocols/moves/Mover.fwd.hh
>
26
#include <
protocols/moves/Mover.hh
>
27
#include <
protocols/moves/MonteCarlo.fwd.hh
>
28
#include <
protocols/simple_moves/BackboneMover.hh
>
29
#include <
protocols/simple_moves/MinMover.hh
>
30
#include <
protocols/moves/MoverContainer.hh
>
31
#include <
protocols/moves/PyMolMover.hh
>
32
33
#include <
core/scoring/ScoreFunction.hh
>
34
#include <
core/scoring/ScoreFunctionFactory.hh
>
35
#include <basic/Tracer.hh>
36
#include <basic/options/option.hh>
37
#include <basic/options/keys/run.OptionKeys.gen.hh>
38
39
//Utility Headers
40
#include <utility/exit.hh>
41
#include <basic/prof.hh>
42
#include <basic/Tracer.hh>
43
44
45
using
basic::T
;
46
using
basic::Error;
47
using
basic::Warning;
48
49
static
basic::Tracer
TR
(
"protocols.SurfaceDocking.CentroidRelaxMover"
);
50
51
52
namespace
protocols {
53
namespace
surface_docking {
54
55
using namespace
core;
56
using namespace
protocols::moves;
57
58
//constructor
59
CentroidRelaxMover::CentroidRelaxMover
() :
Mover
(){
60
// initilized here to avoid warning!
61
nmoves_
=2;
62
temperature_
=0.5;
63
kT_
=0.5;
64
Mover::type
(
"CentroidRelaxMover"
);
65
TR
<<
"CentroidRelaxMover Constructor Called"
<< std::endl;
66
setup_defaults
();
67
}
68
69
//destructor
70
CentroidRelaxMover::~CentroidRelaxMover
() {}
71
72
void
CentroidRelaxMover::setup_defaults
(){
73
TR
<<
"Setting Defaults"
<< std::endl;
74
// setting MoveMaps
75
// Setting up default score function -->place to add modified score6 from
76
// rosetta++
77
score_low_res_
=
78
scoring::ScoreFunctionFactory::
79
create_score_function
(
"RS_centroid.wts"
);
//("cen_std.wts");
80
smallmin_type_
=
"linmin"
;
81
shearmin_type_
=
"dfpmin"
;
82
benchmark_
=
false
;
83
setupMovers
();
84
init_from_options
();
85
}
86
87
void
CentroidRelaxMover::init_from_options
() {
88
using namespace
basic::options;
89
using namespace
basic::options::OptionKeys;
90
benchmark_
= option[ OptionKeys::run::benchmark ]();
91
92
}
93
94
void
CentroidRelaxMover::setupMovers
(){
95
// Setting Common Parameters for movers
96
moveMapOP_
=
new
core::kinematics::MoveMap
;
97
moveMapOP_
->set_bb(
true
);
98
Real
tolerance=0.01;
// for minimizer
99
100
//Setting up smallTrialMover
101
//Creating smallMove; temperature_ : explanation;
102
// nnmoves_ : number of residues to move(Robin thinks its a
103
// good idea to change this based on length of peptide !!!!
104
smallmover_
=
new
simple_moves::SmallMover
(
moveMapOP_
,
temperature_
,
nmoves_
/2);
105
smallmover_
->angle_max(30);
// max angle deviation.
106
//Default Values copied from MinMover.cc
107
smallminmover_
=
new
simple_moves::MinMover
(
moveMapOP_
,
108
score_low_res_
,
smallmin_type_
,tolerance,
true
,
false
,
false
);
109
//smallsequenceMover_ =
110
/// new moves::SequenceMover(smallmover_,smallminmover_);
111
smallsequenceMover_
=
new
moves::SequenceMover
;
112
smallsequenceMover_
->add_mover(
smallmover_
);
113
smallsequenceMover_
->add_mover(
smallminmover_
);
114
115
//Setting up shearTrialMover
116
//Creating smallMove; temperature_ : explanation;
117
//nnmoves_ : number of residues to move
118
shearmover_
=
new
simple_moves::ShearMover
(
moveMapOP_
,
temperature_
,
nmoves_
);
119
shearmover_
->angle_max(30);
120
//Default Values copied from MinMover.cc
121
shearminmover_
=
new
simple_moves::MinMover
(
moveMapOP_
,
score_low_res_
,
122
shearmin_type_
,tolerance,
true
,
false
,
false
);
123
//shearsequenceMover_ =
124
//new moves::SequenceMover(shearmover_,shearminmover_);
125
shearsequenceMover_
=
new
moves::SequenceMover
;
126
shearsequenceMover_
->add_mover(
shearmover_
);
127
shearsequenceMover_
->add_mover(
shearminmover_
);
128
129
}
130
131
132
void
CentroidRelaxMover::FinalizeMovers
(
pose::Pose
& pose){
133
TR
<<
"Finalizing Movers"
<< std::endl;
134
// To init the final part of min_trial_small & mini_trial_shear mover
135
// Creating a global mc object that can be used by both
136
// small_min_trial_mover() and shear_min_trial_mover()
137
monteCarlo_
=
new
moves::MonteCarlo
(pose,*
score_low_res_
,
kT_
);
138
//smallTrialMover
139
TR
<<
"Finalizing small Movers"
<< std::endl;
140
smallmonteCarlo_
=
new
moves::MonteCarlo
(pose,*
score_low_res_
,
kT_
);
141
small_trial_min_mover_
=
142
new
moves::TrialMover
(
smallsequenceMover_
,
monteCarlo_
);
143
//shearTrialMover
144
TR
<<
"Finalizing shear Movers"
<< std::endl;
145
shearmonteCarlo_
=
new
moves::MonteCarlo
(pose,*
score_low_res_
,
kT_
);
146
shear_trial_min_mover_
=
147
new
moves::TrialMover
(
shearsequenceMover_
,
monteCarlo_
);
148
}
149
150
void
CentroidRelaxMover::apply
(
pose::Pose
& pose){
151
FinalizeMovers
(pose);
152
TR
<<
"Starting CentroidRelax"
<< std::endl;
153
Size
innerLoopCycle= pose.
total_residue
();
154
Size
outerLoopCycle=6;
155
for
(
Size
outerLoop = 1; outerLoop <= outerLoopCycle; ++outerLoop ){
156
TR
<<
"OuterLoop Execution Number:"
<< outerLoop << std::endl;
157
monteCarlo_
->recover_low(pose);
158
shear_trial_min_mover_
->apply(pose);
159
for
(
Size
innerLoop = 1; innerLoop <=innerLoopCycle; ++innerLoop ){
160
TR
<<
"InnerLoop Execution Number:"
<< innerLoop << std::endl;
161
small_trial_min_mover_
->apply(pose);
162
}
163
}
164
monteCarlo_
->show_counters();
165
monteCarlo_
->recover_low(pose);
166
}
167
168
void
CentroidRelaxMover::set_nmoves
(
core::Size
const
nmoves_in ){
169
nmoves_
= nmoves_in;
170
}
171
172
std::string
CentroidRelaxMover::get_name
()
const
{
173
return
"CentroidRelaxMover"
;
174
}
175
176
177
178
}
//surfaceDockingProtocol
179
180
}
//protocol
Generated on Sat Jun 1 2013 12:18:33 for Rosetta 3.5 by
1.8.4