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
ligand_docking
RandomConformerMover.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/ligand_docking/RandomConformerMover.cc
11
///
12
/// @brief
13
/// @author Ian W. Davis
14
15
16
#include <
protocols/ligand_docking/RandomConformerMover.hh
>
17
18
#include <
core/graph/Graph.hh
>
19
#include <
core/chemical/ResidueType.hh
>
20
#include <
core/conformation/Residue.hh
>
21
#include <
core/pack/task/PackerTask.hh
>
22
#include <
core/pack/task/TaskFactory.hh
>
23
#include <
core/pose/Pose.hh
>
24
#include <
core/scoring/ScoreFunction.hh
>
25
#include <
core/pack/dunbrack/RotamerLibrary.hh
>
26
#include <numeric/random/random.hh>
27
28
// option key includes
29
30
#include <utility/vector1.hh>
31
32
static
numeric::random::RandomGenerator
my_RG
(810106);
// <- Magic number, do not change it!!! That's Ian Davis's thing- not sure why
33
34
namespace
protocols {
35
namespace
ligand_docking {
36
37
38
RandomConformerMover::RandomConformerMover
(
core::Size
resid):
39
Mover(),
40
resid_(resid)
41
{
42
Mover::type(
"RandomConformerMover"
);
43
}
44
45
46
RandomConformerMover::~RandomConformerMover
()
47
{
48
}
49
50
51
void
RandomConformerMover::apply
(
core::pose::Pose
& pose )
52
{
53
using
core::conformation::ResidueOP
;
54
using namespace
core::pack::task;
55
utility::vector1< ResidueOP >
conformers;
56
// Dummy parameters that the ligand rotamer library doesn't use:
57
core::scoring::ScoreFunction
dummy_scorefxn;
58
PackerTaskOP
dummy_pack_task = TaskFactory::create_packer_task(pose);
59
dummy_pack_task->initialize_from_command_line();
// -ex1 -ex2 etc.
60
utility::vector1< utility::vector1< core::Real >
> dummy_extra_chi_steps;
61
core::graph::GraphCOP
dummy_graph =
new
core::graph::Graph
();
62
// Retrieve conformers
63
core::pack::dunbrack::SingleResidueRotamerLibraryCAP
reslib =
core::pack::dunbrack::RotamerLibrary::get_instance
().
get_rsd_library
( pose.
residue_type
(
resid_
) );
64
if
( reslib.get() == NULL )
return
;
65
reslib->fill_rotamer_vector(
66
pose,
67
dummy_scorefxn,
68
*dummy_pack_task,
69
dummy_graph,
70
&pose.
residue_type
(
resid_
),
//ResidueTypeCOP
71
pose.
residue
(
resid_
),
72
dummy_extra_chi_steps,
73
true
/* sure, let's pretend it's buried */
,
74
conformers
// output appended here
75
);
76
// If -include_current push back current conformer
77
// This is rarely necessary...
78
//if( option[ OptionKeys::packing::use_input_sc ] ) {
79
// ResidueOP curr_copy = new Residue( pose.residue(resid_) );
80
// conformers.push_back(curr_copy);
81
//}
82
// Choose one at random
83
ResidueOP
selected_res = conformers[
my_RG
.random_range(1, conformers.size()) ];
84
// Residue library has already superimpose residues appropriately, so don't orient again
85
pose.
replace_residue
(
resid_
, *selected_res,
false
/*orient backbone*/
);
86
}
87
88
std::string
89
RandomConformerMover::get_name
()
const
{
90
return
"RandomConformerMover"
;
91
}
92
93
94
}
// namespace ligand_docking
95
}
// namespace protocols
Generated on Sat Jun 1 2013 11:56:10 for Rosetta 3.5 by
1.8.4