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
RandomConformers.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 protocol/ligand_docking/RandomConformers.cc
11
/// @brief implementation of resfile reader and its command classes
12
/// @author Gordon Lemmon (glemmon@gmail.com), adapted from the ResfileReader code
13
/// by Steven Lewis (smlewi@unc.edu) and Andrew Leaver-Fay
14
15
// Project Headers
16
#include <
core/pose/Pose.hh
>
17
#include <
core/conformation/Conformation.hh
>
18
19
// Unit Headers
20
#include <
protocols/ligand_docking/RandomConformers.hh
>
21
#include <
protocols/ligand_docking/RandomConformersCreator.hh
>
22
23
#include <
protocols/ligand_docking/RandomConformerMover.hh
>
24
// AUTO-REMOVED #include <protocols/ligand_docking/UnconstrainedTorsionsMover.hh>
25
26
#include <
core/pose/util.hh
>
27
28
// Utility Headers
29
#include <utility/exit.hh>
30
#include <basic/Tracer.hh>
31
#include <
core/types.hh
>
32
#include <utility/tag/Tag.hh>
33
34
#include <utility/vector0.hh>
35
#include <utility/excn/Exceptions.hh>
36
#include <utility/vector1.hh>
37
38
39
using
basic::T
;
40
using
basic::Error;
41
using
basic::Warning;
42
43
namespace
protocols {
44
namespace
ligand_docking {
45
46
///////////////////////////////////////////////////////////////////////
47
///@brief
48
49
static
basic::Tracer
random_conformer_tracer
(
"protocols.ligand_docking.ligand_options.RandomConformers"
, basic::t_debug);
50
51
std::string
52
RandomConformersCreator::keyname
()
const
53
{
54
return
RandomConformersCreator::mover_name
();
55
}
56
57
protocols::moves::MoverOP
58
RandomConformersCreator::create_mover
()
const
{
59
return
new
RandomConformers
;
60
}
61
62
std::string
63
RandomConformersCreator::mover_name
()
64
{
65
return
"RandomConformers"
;
66
}
67
68
RandomConformers::RandomConformers
():
69
//utility::pointer::ReferenceCount(),
70
Mover(
"RandomConformers"
)
71
{}
72
73
RandomConformers::RandomConformers
(
RandomConformers
const
& that):
74
//utility::pointer::ReferenceCount(),
75
protocols::moves::Mover( that ),
76
chain_(that.chain_)
77
{}
78
79
RandomConformers::~RandomConformers
() {}
80
81
protocols::moves::MoverOP
RandomConformers::clone
()
const
{
82
return
new
RandomConformers
( *
this
);
83
}
84
85
protocols::moves::MoverOP
RandomConformers::fresh_instance
()
const
{
86
return
new
RandomConformers
;
87
}
88
89
std::string
RandomConformers::get_name
()
const
{
90
return
"RandomConformers"
;
91
}
92
93
//void RandomConformers::set_chain(std::string chain)
94
//{
95
// chain_ = chain;
96
//}
97
98
///@brief parse XML (specifically in the context of the parser/scripting scheme)
99
void
100
RandomConformers::parse_my_tag
(
101
utility::tag::TagPtr
const
tag,
102
protocols::moves::DataMap
&
/*datamap*/
,
103
protocols::filters::Filters_map
const
&
/*filters*/
,
104
protocols::moves::Movers_map
const
&
/*movers*/
,
105
core::pose::Pose
const
&
/*pose*/
106
)
107
{
108
if
( tag->getName() !=
"RandomConformers"
){
109
throw
utility::excn::EXCN_RosettaScriptsOption(
"This should be impossible"
);
110
}
111
if
( ! tag->hasOption(
"chain"
) )
throw
utility::excn::EXCN_RosettaScriptsOption(
"'RandomConformers' mover requires chain tag"
);
112
113
chain_
= tag->getOption<
std::string
>(
"chain"
);
114
}
115
116
void
RandomConformers::apply
(
core::pose::Pose
& pose) {
117
core::Size
chain_id=
core::pose::get_chain_id_from_chain
(
chain_
, pose);
118
core::Size
i = pose.
conformation
().
chain_begin
(chain_id);
119
core::Size
end
= pose.
conformation
().
chain_end
(chain_id);
120
121
for
(; i !=
end
; ++i) {
122
apply_residue
(i, pose);
123
}
124
}
125
126
void
RandomConformers::apply_residue
(
core::Size
const
residue_id,
core::pose::Pose
& pose) {
127
using namespace
protocols::moves;
128
using
core::conformation::ResidueOP
;
129
RandomConformerMoverOP
rcm =
new
RandomConformerMover
(residue_id);
130
rcm->apply(pose);
131
/// TODO accomplish the below code within the scripter
132
// UnconstrainedTorsionsMoverOP utm =
133
// new UnconstrainedTorsionsMover(rcm, ligand_torsion_restraints_);
134
// utm->apply(pose);
135
}
136
137
}
//namespace ligand_docking
138
}
//namespace protocols
Generated on Sat Jun 1 2013 11:56:11 for Rosetta 3.5 by
1.8.4