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
LoopLengthChange.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/LoopLengthChange.cc
11
/// @brief
12
/// @author Sarel Fleishman (sarelf@u.washington.edu)
13
14
// Unit headers
15
#include <
protocols/protein_interface_design/movers/LoopLengthChange.hh
>
16
#include <
protocols/protein_interface_design/movers/LoopLengthChangeCreator.hh
>
17
18
// Package headers
19
#include <
core/pose/Pose.hh
>
20
#include <
core/conformation/Conformation.hh
>
21
#include <basic/Tracer.hh>
22
#include <utility/tag/Tag.hh>
23
#include <
core/chemical/ResidueType.hh
>
24
#include <
protocols/moves/DataMap.fwd.hh
>
25
#include <
protocols/moves/Mover.hh
>
26
#include <
core/pose/selection.hh
>
27
#include <
core/conformation/Residue.hh
>
28
#include <
core/conformation/ResidueFactory.hh
>
29
#include <
core/chemical/ResidueTypeSet.hh
>
30
#include <utility/vector0.hh>
31
#include <utility/vector1.hh>
32
#include <
core/pose/PDBInfo.hh
>
33
34
35
namespace
protocols {
36
namespace
protein_interface_design {
37
namespace
movers {
38
39
using namespace
std;
40
using namespace
core::scoring;
41
42
static
basic::Tracer
TR
(
"protocols.protein_interface_design.movers.LoopLengthChange"
);
43
44
std::string
45
LoopLengthChangeCreator::keyname
()
const
46
{
47
return
LoopLengthChangeCreator::mover_name
();
48
}
49
50
protocols::moves::MoverOP
51
LoopLengthChangeCreator::create_mover
()
const
{
52
return
new
LoopLengthChange
;
53
}
54
55
std::string
56
LoopLengthChangeCreator::mover_name
()
57
{
58
return
"LoopLengthChange"
;
59
}
60
61
LoopLengthChange::LoopLengthChange
() :
62
Mover
(
LoopLengthChangeCreator
::mover_name() ),
63
loop_start_( 0 ), loop_end_( 0 ), delta_( 0 )
64
{
65
}
66
67
68
LoopLengthChange::~LoopLengthChange
() {}
69
70
void
71
LoopLengthChange::apply
(
core::pose::Pose
& pose )
72
{
73
TR
<<
"Changing loop "
<<
loop_start
()<<
"-"
<<
loop_end
()<<
" by "
<<
delta
()<<std::endl;
74
runtime_assert(
loop_end
() >=
loop_start
() );
75
runtime_assert(
loop_end
() +
delta
() >=
loop_start
() );
76
if
(
delta
() < 0 ){
77
for
(
int
del(0); del>
delta
(); --del ){
78
pose.
delete_polymer_residue
(
loop_end
() + del );
79
// pose.conformation().insert_ideal_geometry_at_polymer_bond( loop_start() );
80
// pose.conformation().insert_ideal_geometry_at_polymer_bond( loop_start() + 1 );
81
}
82
}
83
else
if
(
delta
() > 0 ){
84
using namespace
core::chemical;
85
using namespace
core::conformation;
86
87
ResidueTypeSet
const
& residue_set( pose.
residue
( 1 ).
residue_type_set
() );
// residuetypeset is noncopyable
88
ResidueCOP
new_res =
ResidueFactory::create_residue
( residue_set.name_map(
name_from_aa
(
aa_from_oneletter_code
(
'A'
) ) ) );
89
for
(
core::Size
leng(1); leng<=(
core::Size
)
delta
(); ++leng ){
90
pose.
conformation
().
safely_append_polymer_residue_after_seqpos
( *new_res,
loop_end
() + leng - 1,
true
/*build_ideal
91
_geometry*/
);
92
// pose.set_omega(loop_end()+leng-1,180.0);
93
}
94
}
95
pose.
update_residue_neighbors
();
96
pose.
pdb_info
()->obsolete(
true
);
97
}
98
99
std::string
100
LoopLengthChange::get_name
()
const
{
101
return
LoopLengthChangeCreator::mover_name
();
102
}
103
104
void
105
LoopLengthChange::parse_my_tag
(
TagPtr
const
tag,
protocols::moves::DataMap
&,
protocols::filters::Filters_map
const
&,
protocols::moves::Movers_map
const
&,
core::pose::Pose
const
& pose )
106
{
107
loop_start
(
core::pose::parse_resnum
( tag->getOption<
std::string
>(
"loop_start"
), pose ) );
108
loop_end
(
core::pose::parse_resnum
( tag->getOption<
std::string
>(
"loop_end"
), pose ) );
109
delta
( tag->getOption<
int
>(
"delta"
) );
110
111
runtime_assert(
loop_end
() >
loop_start
() );
112
runtime_assert(
loop_end
() +
delta
() >=
loop_start
() );
113
114
TR
<<
"LoopLengthChange with loop "
<<
loop_start
()<<
"-"
<<
loop_end
()<<
" and delta "
<<
delta
()<<std::endl;
115
}
116
117
protocols::moves::MoverOP
118
LoopLengthChange::clone
()
const
{
119
return
(
protocols::moves::MoverOP
(
new
LoopLengthChange
( *
this
) ));
120
}
121
122
void
123
LoopLengthChange::loop_start
(
core::Size
const
loop_start
){
124
loop_start_
=
loop_start
;
125
}
126
127
core::Size
128
LoopLengthChange::loop_start
()
const
{
129
return
(
loop_start_
);
130
}
131
132
void
133
LoopLengthChange::loop_end
(
core::Size
const
l ){
134
loop_end_
= l;
135
}
136
137
core::Size
138
LoopLengthChange::loop_end
()
const
{
139
return
(
loop_end_
);
140
}
141
142
void
143
LoopLengthChange::delta
(
int
const
d ){
144
delta_
= d;
145
}
146
147
int
148
LoopLengthChange::delta
()
const
{
149
return
(
delta_
);
150
}
151
152
}
//movers
153
}
//protein_interface_design
154
}
//protocols
Generated on Sat Jun 1 2013 12:05:19 for Rosetta 3.5 by
1.8.4