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
core
pack
task
operation
NoRepackDisulfides.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 core/pack/task/operation/NoRepackDisulfides.cc
11
/// @brief prevent disulfides from being repacked; assumes disulfide info in
12
/// Pose is up-to-date
13
/// @author Yih-En Andrew Ban (yab@u.washington.edu)
14
15
// unit headers
16
#include <
core/pack/task/operation/NoRepackDisulfides.hh
>
17
#include <
core/pack/task/operation/NoRepackDisulfidesCreator.hh
>
18
19
// package headers
20
#include <
core/chemical/AA.hh
>
21
#include <
core/chemical/VariantType.hh
>
22
#include <
core/conformation/Residue.hh
>
23
#include <
core/pack/task/PackerTask.hh
>
24
#include <
core/pose/Pose.hh
>
25
#include <
core/pose/symmetry/util.hh
>
26
#include <
core/conformation/symmetry/SymmetryInfo.hh
>
27
#include <basic/Tracer.hh>
28
29
#include <utility/vector1.hh>
30
31
32
// C++ headers
33
34
35
namespace
core {
36
namespace
pack {
37
namespace
task {
38
namespace
operation {
39
40
41
// static
42
static
basic::Tracer
TR
(
"core.pack.task.operation.NoRepackDisulfides"
);
43
44
45
/// @brief default constructor
46
NoRepackDisulfides::NoRepackDisulfides
() :
47
Super
()
48
{}
49
50
51
/// @brief copy constructor
52
NoRepackDisulfides::NoRepackDisulfides
(
NoRepackDisulfides
const
& rval ) :
53
Super
( rval )
54
{}
55
56
57
/// @brief default destructor
58
NoRepackDisulfides::~NoRepackDisulfides
() {}
59
60
TaskOperationOP
NoRepackDisulfidesCreator::create_task_operation
()
const
61
{
62
return
new
NoRepackDisulfides
;
63
}
64
65
/// @brief clone this object
66
NoRepackDisulfides::TaskOperationOP
NoRepackDisulfides::clone
()
const
{
67
return
new
NoRepackDisulfides
( *
this
);
68
}
69
70
/// @brief apply operations to PackerTask
71
void
NoRepackDisulfides::apply
(
Pose
const
& pose,
PackerTask
& task )
const
{
72
using
core::Size
;
73
using
core::chemical::aa_cys
;
74
using
core::chemical::DISULFIDE
;
75
using
core::conformation::Residue
;
76
77
core::Size
nres = pose.
total_residue
();
78
if
(
core::pose::symmetry::is_symmetric
(pose) ) {
79
nres =
core::pose::symmetry::symmetry_info
(pose)->num_independent_residues();
80
}
81
82
83
for
(
Size
i = 1, ie = nres; i <= ie; ++i ) {
84
Residue
const
& res = pose.
residue
( i );
85
86
// residue appears to be a disulfide...?
87
if
( res.
aa
() ==
aa_cys
&& res.
has_variant_type
(
DISULFIDE
) ) {
88
89
bool
no_repack =
true
;
90
91
// try and double-check if possible
92
if
( res.
type
().
has_atom_name
(
"SG"
) ) {
93
// check its partner to see if it's really the case
94
Size
const
sg_index = res.
atom_index
(
"SG"
);
95
Size
const
sg_conn_index = res.
type
().
residue_connection_id_for_atom
( sg_index );
96
Residue
const
& partner_res = pose.
residue
( res.
residue_connection_partner
( sg_conn_index ) );
97
98
if
( partner_res.
aa
() !=
aa_cys
|| !partner_res.
has_variant_type
(
DISULFIDE
) ) {
99
no_repack =
false
;
100
}
101
}
102
103
// set repack status
104
if
( no_repack ) {
105
TR.Debug <<
"found disulfide residue "
<< i <<
", preventing repack at this position"
<< std::endl;
106
task.
nonconst_residue_task
( i ).
prevent_repacking
();
107
}
else
{
108
TR.Warning <<
"WARNING: residue "
<< i <<
" marked as disulfide but has no partner, allowing repack at this position"
<< std::endl;
109
}
110
111
}
112
113
}
// foreach residue
114
115
}
116
117
118
}
// namespace operation
119
}
// namespace task
120
}
// namespace pack
121
}
// namespace core
122
Generated on Sat Jun 1 2013 11:33:50 for Rosetta 3.5 by
1.8.4