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
task_operations
RestrictToCDRH3Loop.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/task_operations/RestrictToCDRH3Loop.cc
11
/// @brief
12
/// @author Brian D. Weitzner (brian.weitzner@gmail.com)
13
14
// Unit headers
15
#include <
protocols/toolbox/task_operations/RestrictToCDRH3Loop.hh
>
16
#include <
protocols/toolbox/task_operations/RestrictToCDRH3LoopCreator.hh
>
17
#include <
core/pack/task/operation/TaskOperation.hh
>
18
19
// Project headers
20
#include <
core/pose/Pose.hh
>
21
#include <
core/pose/PDBInfo.hh
>
22
#include <
core/pack/task/operation/TaskOperations.hh
>
23
24
// Utility headers
25
#include <utility/exit.hh>
26
27
28
29
namespace
protocols {
30
namespace
toolbox {
31
namespace
task_operations {
32
33
using
core::pose::Pose
;
34
using
core::pack::task::PackerTask
;
35
using
core::pack::task::operation::TaskOperationOP
;
36
using
utility::tag::TagPtr
;
37
38
39
RestrictToCDRH3Loop::RestrictToCDRH3Loop
() :
parent
() {}
40
41
RestrictToCDRH3Loop::RestrictToCDRH3Loop
(
RestrictToCDRH3Loop
const
& ) :
parent
() {}
42
43
RestrictToCDRH3Loop::~RestrictToCDRH3Loop
() {}
44
45
TaskOperationOP
RestrictToCDRH3Loop::clone
()
const
46
{
47
return
new
RestrictToCDRH3Loop
( *
this
);
48
}
49
50
void
RestrictToCDRH3Loop::apply
(
Pose
const
& pose,
PackerTask
& task )
const
51
{
52
53
54
core::pack::task::operation::PreventRepacking
turn_off_packing;
55
core::pack::task::operation::RestrictResidueToRepacking
turn_on_packing;
56
57
for
(
Size
residue_number = 1; residue_number <= pose.
total_residue
(); ++residue_number )
58
{
59
if
(
residue_is_in_h3_loop
( pose, residue_number ) )
60
{
61
turn_on_packing.
include_residue
( residue_number );
62
}
63
else
64
{
65
turn_off_packing.
include_residue
( residue_number );
66
}
67
}
68
69
turn_off_packing.
apply
( pose, task );
70
turn_on_packing.
apply
( pose, task );
71
}
72
73
bool
RestrictToCDRH3Loop::residue_is_in_h3_loop
(
Pose
const
& pose,
Size
residue_number )
const
74
{
75
Size
const
pose_numbered_h3_loop_start( pose.
pdb_info
()->pdb2pose(
heavy_chain
,
pdb_numbered_h3_loop_start
) );
76
Size
const
pose_numbered_h3_loop_end( pose.
pdb_info
()->pdb2pose(
heavy_chain
,
pdb_numbered_h3_loop_end
) );
77
78
return
( residue_number >= pose_numbered_h3_loop_start ) && ( residue_number <= pose_numbered_h3_loop_end );
79
}
80
81
TaskOperationOP
RestrictToCDRH3LoopCreator::create_task_operation
()
const
82
{
83
return
new
RestrictToCDRH3Loop
;
84
}
85
86
}
//namespace task_operations
87
}
//namespace toolbox
88
}
//namespace protocols
Generated on Sat Jun 1 2013 12:23:56 for Rosetta 3.5 by
1.8.4