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
toolbox
rotamer_set_operations
SpecialRotamerRotSetOps.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/toolbox/RotamerSetOperations/SpecialRotamerRotSetOps.cc
11
/// @brief combine two rotamer sets
12
/// @author Summer Thyme, sthyme@gmail.com, Jan 2010
13
14
// Unit Headers
15
#include <
protocols/toolbox/rotamer_set_operations/SpecialRotamerRotSetOps.hh
>
16
17
//Project headers
18
19
#include <
core/pose/util.hh
>
20
#include <
core/chemical/VariantType.hh
>
21
#include <
core/conformation/Residue.hh
>
22
// AUTO-REMOVED #include <core/graph/Graph.hh>
23
// AUTO-REMOVED #include <core/pack/task/PackerTask.hh>
24
#include <
core/pack/rotamer_set/RotamerSet.hh
>
25
// AUTO-REMOVED #include <core/pack/rotamer_set/RotamerSet_.hh>
26
// AUTO-REMOVED #include <core/pose/Pose.hh>
27
#include <basic/Tracer.hh>
28
29
#include <utility/vector1.hh>
30
31
32
namespace
protocols {
33
namespace
toolbox {
34
namespace
rotamer_set_operations {
35
36
static
basic::Tracer
tr
(
"protocols.toolbox.RotamerSetOperations.SpecialRotamerRotSetOps"
);
37
38
SpecialRotamerRSO::SpecialRotamerRSO
(
core::Size
seqpos )
39
:
parent
(),
40
seqpos_(seqpos)
41
{
42
new_rots_
.clear();
43
}
44
45
SpecialRotamerRSO::SpecialRotamerRSO
(
SpecialRotamerRSO
const
& src )
46
:
parent
( src ),
47
seqpos_(src.seqpos_),
48
new_rots_(src.new_rots_)
49
{}
50
51
52
SpecialRotamerRSO::~SpecialRotamerRSO
(){}
53
54
core::pack::rotamer_set::RotamerSetOperationOP
55
SpecialRotamerRSO::clone
()
const
{
56
return
new
SpecialRotamerRSO
( *
this
);
57
}
58
59
60
/// @brief all this alter_rotamer_set function does
61
/// is to append a rotamer_set that is a member
62
/// of this RSO to the input rotamer_set
63
/// Making sure that the variant type is not
64
/// on the rotamers of the original rotamer set
65
void
66
SpecialRotamerRSO::alter_rotamer_set
(
67
core::pose::Pose
const
& pose,
68
//mjo commenting out 'sfxn' because it is unused and causes a warning
69
core::scoring::ScoreFunction
const
&
/*sfxn*/
,
70
//mjo commenting out 'ptask' because it is unused and causes a warning
71
core::pack::task::PackerTask
const
&
/*ptask*/
,
72
//mjo commenting out 'packer_neighbor_graph' because it is unused and causes a warning
73
core::graph::GraphCOP
/*packer_neighbor_graph*/
,
74
core::pack::rotamer_set::RotamerSet
& rotamer_set
75
)
76
{
77
using namespace
core::pack::rotamer_set;
78
if
(
new_rots_
.empty() ) {
79
std::cerr <<
"Warning!! The rotamer_set (new_rots_) you are trying to append is empty"
<< std::endl;
80
return
;
81
}
82
if
( rotamer_set.
resid
() ==
seqpos_
) {
83
// make sure to remove any rotamers from original set that were already set as variant pink
84
core::pack::rotamer_set::Rotamers
variant_rotamers;
85
utility::vector1< bool >
rotamers2dropb( rotamer_set.
num_rotamers
(), false );
86
for
(
core::Size
r(1); r<=rotamer_set.
num_rotamers
(); ++r ) {
87
if
( ! rotamer_set.
rotamer
(r)->has_variant_type(
core::chemical::SPECIAL_ROT
) )
continue
;
88
rotamers2dropb[r] =
true
;
89
core::conformation::ResidueOP
variant_rot(
core::pose::remove_variant_type_from_residue
( *rotamer_set.
rotamer
(r),
core::chemical::SPECIAL_ROT
, pose ) );
90
variant_rotamers.push_back( variant_rot );
91
rotamer_set.
add_rotamer
( *variant_rot );
92
rotamers2dropb.push_back(
false
);
93
}
94
rotamer_set.
drop_rotamers
( rotamers2dropb );
95
96
// add the new rotamers
97
for
(
core::Size
i(1); i <=
new_rots_
.size(); ++i ) {
98
rotamer_set.
add_rotamer
( *
new_rots_
[i] );
99
100
}
101
}
102
}
103
104
105
// this function takes the input rotamers from the motif screen
106
void
107
SpecialRotamerRSO::set_new_rots
(
108
core::pack::rotamer_set::Rotamers
& new_rots
109
)
110
{
111
for
(
core::Size
i(1); i <= new_rots.size(); ++i ) {
112
new_rots_
.push_back( new_rots[i] );
113
}
114
}
115
116
}
//namespace rotamer_set_operations
117
}
//namespace toolbox
118
}
//namespace protocols
Generated on Sat Jun 1 2013 12:22:57 for Rosetta 3.5 by
1.8.4