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
AddChainBreak.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/AddChainBreak.cc
11
/// @brief
12
/// @author Sarel Fleishman (sarelf@u.washington.edu)
13
14
// Unit headers
15
#include <
protocols/protein_interface_design/movers/AddChainBreak.hh
>
16
#include <
protocols/protein_interface_design/movers/AddChainBreakCreator.hh
>
17
#include <
core/pose/util.hh
>
18
// Package headers
19
#include <
core/chemical/VariantType.hh
>
20
// Project headers
21
#include <utility/tag/Tag.hh>
22
#include <basic/Tracer.hh>
23
#include <
core/pose/Pose.hh
>
24
#include <
core/kinematics/FoldTree.hh
>
25
#include <
protocols/rosetta_scripts/util.hh
>
26
#include <
core/pose/selection.hh
>
27
#include <boost/foreach.hpp>
28
#define foreach BOOST_FOREACH
29
30
//Auto Headers
31
#include <utility/vector0.hh>
32
#include <utility/vector1.hh>
33
34
35
namespace
protocols {
36
namespace
protein_interface_design {
37
namespace
movers {
38
39
using namespace
core;
40
using namespace
std;
41
using namespace
core::scoring;
42
using namespace
protocols::moves;
43
44
static
basic::Tracer
TR
(
"protocols.protein_interface_design.movers.AddChainBreak"
);
45
46
std::string
47
AddChainBreakCreator::keyname
()
const
48
{
49
return
AddChainBreakCreator::mover_name
();
50
}
51
52
protocols::moves::MoverOP
53
AddChainBreakCreator::create_mover
()
const
{
54
return
new
AddChainBreak
;
55
}
56
57
std::string
58
AddChainBreakCreator::mover_name
()
59
{
60
return
"AddChainBreak"
;
61
}
62
63
AddChainBreak::AddChainBreak
() :
64
protocols::moves::
Mover
(
AddChainBreakCreator
::mover_name() ),
65
resnum_(
""
),
66
change_foldtree_( true ),
67
find_automatically_( false ),
68
automatic_distance_cutoff_( 2.5 )
69
{}
70
71
AddChainBreak::~AddChainBreak
() {}
72
73
protocols::moves::MoverOP
74
AddChainBreak::clone
()
const
{
75
return
(
protocols::moves::MoverOP
(
new
AddChainBreak
( *
this
) ) );
76
}
77
78
void
79
AddChainBreak::parse_my_tag
(
TagPtr
const
tag,
DataMap
&,
protocols::filters::Filters_map
const
&,
Movers_map
const
&,
core::pose::Pose
const
& )
80
{
81
/// resnum & pdb_num are now equivalent
82
if
( tag->hasOption(
"resnum"
) )
83
resnum_
= tag->getOption<
std::string
> (
"resnum"
);
84
else
if
( tag->hasOption(
"pdb_num"
) ){
85
resnum_
= tag->getOption<
std::string
> (
"pdb_num"
);
86
}
87
if
( tag->hasOption(
"find_automatically"
) ){
88
find_automatically
( tag->getOption<
bool
>(
"find_automatically"
) );
89
automatic_distance_cutoff
( tag->getOption<
core::Real
>(
"distance_cutoff"
, 2.5 ));
90
}
91
change_foldtree
( tag->getOption<
bool
>(
"change_foldtree"
,
true
) );
92
TR<<
"resnum: "
<<
resnum_
<<
" change foldtree "
<<
change_foldtree
()<<
" find cutpoints automatically "
<<
find_automatically
()<<std::endl;
93
}
//end parse my tag
94
95
void
96
AddChainBreak::apply
(
core::pose::Pose
& pose )
97
{
98
using namespace
core::chemical;
99
using namespace
pose;
100
core::kinematics::FoldTree
f( pose.
fold_tree
() );
101
102
if
(
resnum
() !=
""
){
103
core::Size
const
resn(
core::pose::parse_resnum
(
resnum
(), pose ) );
104
105
if
(
change_foldtree
() ){
106
f.new_jump( resn, resn+1, resn );
107
}
108
if
(pose.
residue
(resn ).
is_upper_terminus
())
core::pose::remove_upper_terminus_type_from_pose_residue
(pose,resn);
109
if
(pose.
residue
(resn+1).
is_lower_terminus
())
core::pose::remove_lower_terminus_type_from_pose_residue
(pose,resn+1);
110
add_variant_type_to_pose_residue
( pose,
CUTPOINT_LOWER
, resn );
111
add_variant_type_to_pose_residue
( pose,
CUTPOINT_UPPER
, resn +1);
112
}
113
utility::vector1< core::Size >
cuts;
114
cuts.clear();
115
if
(
find_automatically
() ){
116
for
(
core::Size
i = 1; i < pose.
total_residue
(); ++i ){
117
core::Real
const
distance
( pose.
residue
( i ).
xyz
(
"C"
).distance( pose.
residue
( i + 1 ).
xyz
(
"N"
) ) );
118
if
( distance >=
automatic_distance_cutoff
() ){
119
cuts.push_back( i );
120
TR<<
"Detecting cut at "
<<i<<
" with distance "
<<distance<<std::endl;
121
}
122
}
123
}
124
foreach
(
core::Size
const
res, cuts ){
125
add_variant_type_to_pose_residue
( pose,
CUTPOINT_LOWER
, res );
126
add_variant_type_to_pose_residue
( pose,
CUTPOINT_UPPER
, res +1);
127
if
(
change_foldtree
() ){
128
f.new_jump( res, res+1, res );
129
}
130
}
131
if
(
change_foldtree
() ){
132
pose.
fold_tree
( f );
133
TR<<
"New fold tree: "
<<pose.
fold_tree
()<<std::endl;
134
}
135
}
136
137
std::string
138
AddChainBreak::get_name
()
const
{
139
return
AddChainBreakCreator::mover_name
();
140
}
141
142
}
//movers
143
}
//protein_interface_design
144
}
//protocols
145
Generated on Sat Jun 1 2013 12:04:09 for Rosetta 3.5 by
1.8.4