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
AddSidechainConstraintsToHotspots.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
11
/// @file protocols/protein_interface_design/movers/AddSidechainConstraintsToHotspots.cc
12
/// @brief
13
/// @author Sarel Fleishman (sarelf@u.washington.edu)
14
15
// Unit headers
16
#include <
protocols/protein_interface_design/movers/AddSidechainConstraintsToHotspots.hh
>
17
#include <
protocols/protein_interface_design/movers/AddSidechainConstraintsToHotspotsCreator.hh
>
18
19
// Project headers
20
#include <
core/pose/Pose.hh
>
21
#include <
protocols/rosetta_scripts/util.hh
>
22
#include <
core/pose/selection.hh
>
23
#include <utility/tag/Tag.hh>
24
#include <
protocols/protein_interface_design/movers/PlaceUtils.hh
>
25
#include <
core/conformation/Conformation.hh
>
26
#include <
core/conformation/Residue.hh
>
27
#include <boost/foreach.hpp>
28
#define foreach BOOST_FOREACH
29
#include <basic/Tracer.hh>
30
// AUTO-REMOVED #include <protocols/moves/DataMap.hh>
31
#include <
core/scoring/constraints/Constraint.hh
>
32
#include <
core/kinematics/FoldTree.hh
>
33
34
#include <utility/vector0.hh>
35
#include <utility/vector1.hh>
36
37
38
namespace
protocols {
39
namespace
protein_interface_design {
40
namespace
movers {
41
42
using
core::pose::Pose
;
43
using namespace
protocols::moves;
44
45
static
basic::Tracer
TR
(
"protocols.protein_interface_design.movers.AddSidechainConstraintsToHotspots"
);
46
static
basic::Tracer
TR_cst
(
"protocols.protein_interface_design.movers.AddSidechainConstraintsToHotspots_csts"
);
47
48
std::string
49
AddSidechainConstraintsToHotspotsCreator::keyname
()
const
50
{
51
return
AddSidechainConstraintsToHotspotsCreator::mover_name
();
52
}
53
54
protocols::moves::MoverOP
55
AddSidechainConstraintsToHotspotsCreator::create_mover
()
const
{
56
return
new
AddSidechainConstraintsToHotspots
;
57
}
58
59
std::string
60
AddSidechainConstraintsToHotspotsCreator::mover_name
()
61
{
62
return
"AddSidechainConstraintsToHotspots"
;
63
}
64
65
66
AddSidechainConstraintsToHotspots::AddSidechainConstraintsToHotspots
() :
67
protocols::moves::
Mover
(
AddSidechainConstraintsToHotspotsCreator
::mover_name() ),
68
chain_( 2 ),
69
coord_sdev_( 1.0 )
70
{ }
71
72
AddSidechainConstraintsToHotspots::~AddSidechainConstraintsToHotspots
() {}
73
74
void
75
AddSidechainConstraintsToHotspots::apply
(
Pose
& pose )
76
{
77
core::Size
const
begin( pose.
conformation
().
chain_begin
(
chain
() ) );
78
core::Size
const
end
( pose.
conformation
().
chain_end
(
chain
() ) );
79
80
int
const
num_cutpoints( pose.
fold_tree
().
num_cutpoint
() );
81
if
( num_cutpoints <= 2 &&
residues
().size() == 0 ){
82
TR<<
"Not enough cutpoints in pose and no residues defined by user. Doing nothing"
<<std::endl;
83
return
;
84
}
85
for
(
int
i=2; i<=pose.
fold_tree
().
num_cutpoint
(); ++i ){
86
core::Size
const
cutpoint = pose.
fold_tree
().
cutpoint
( i );
87
core::Size
const
cutpoint_i_1 = pose.
fold_tree
().
cutpoint
( i - 1 );
88
if
( cutpoint - 1 != cutpoint_i_1 )
continue
;
//only mark residues that are cut on both ends
89
if
( cutpoint <= end && cutpoint >= begin )
90
add_residue
( i );
91
}
92
foreach
(
core::Size
const
residue,
residues
() )
93
{
94
using namespace
core::scoring::constraints;
95
96
HarmonicFuncOP
dummy_cst;
97
ConstraintCOPs
constraint;
98
constraint =
add_coordinate_constraints
( pose, pose.
conformation
().
residue
( residue ),
chain
(), residue,
coord_sdev
(), dummy_cst );
99
foreach
(
ConstraintCOP
cst, constraint ){
100
cst->show_def( TR_cst, pose );
101
}
102
}
103
TR.flush();
104
}
105
106
std::string
107
AddSidechainConstraintsToHotspots::get_name
()
const
{
108
return
AddSidechainConstraintsToHotspotsCreator::mover_name
();
109
}
110
111
void
112
AddSidechainConstraintsToHotspots::parse_my_tag
(
TagPtr
const
tag,
113
DataMap
&,
114
protocols::filters::Filters_map
const
&,
115
Movers_map
const
&,
116
Pose
const
& pose )
117
{
118
chain
( tag->getOption<
core::Size
>(
"chain"
, 2 ) );
119
coord_sdev
( tag->getOption<
core::Real
>(
"coord_sdev"
, 1.0 ) );
120
utility::vector1< core::Size >
v1 =
core::pose::get_resnum_list
( tag,
"resnums"
, pose );
121
foreach
(
core::Size
const
r, v1 ){
add_residue
( r ); }
122
}
123
124
core::Size
125
AddSidechainConstraintsToHotspots::chain
()
const
{
126
return
chain_
;
127
}
128
129
void
130
AddSidechainConstraintsToHotspots::chain
(
core::Size
const
c
){
131
chain_
=
c
;
132
}
133
134
core::Real
135
AddSidechainConstraintsToHotspots::coord_sdev
()
const
{
136
return
coord_sdev_
;
137
}
138
139
void
140
AddSidechainConstraintsToHotspots::coord_sdev
(
core::Real
const
c
){
141
coord_sdev_
=
c
;
142
}
143
144
void
145
AddSidechainConstraintsToHotspots::add_residue
(
core::Size
const
res ){
146
residues_
.insert( res );
147
}
148
149
std::set< core::Size >
const
&
150
AddSidechainConstraintsToHotspots::residues
()
const
{
151
return
residues_
;
152
}
153
154
}
//movers
155
}
//protein_interface_design
156
}
//protocols
157
Generated on Sat Jun 1 2013 12:04:15 for Rosetta 3.5 by
1.8.4