Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RestrictChainToRepackingOperation.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/RestrictChainToRepackingOperation.cc
11 /// @brief
12 /// @author Sarelf Fleishman sarelf@uw.edu
13 
14 // Unit Headers
17 
18 // Project Headers
19 #include <core/pose/Pose.hh>
20 
21 // AUTO-REMOVED #include <core/pack/task/PackerTask.hh>
23 
24 // Utility Headers
25 #include <core/types.hh>
26 #include <basic/Tracer.hh>
27 #include <utility/exit.hh>
29 #include <utility/tag/Tag.hh>
30 
31 // C++ Headers
32 // AUTO-REMOVED #include <set>
33 
34 #include <utility/vector0.hh>
35 #include <utility/vector1.hh>
36 
37 
38 using basic::Error;
39 using basic::Warning;
40 static basic::Tracer TR( "protocols.toolbox.TaskOperations.RestrictChainToRepackingOperation" );
41 
42 namespace protocols {
43 namespace toolbox {
44 namespace task_operations {
45 
46 using namespace core::pack::task::operation;
47 
48 
50 
52  : parent(), chain_( chain )
53 {
54 }
55 
57 
60 {
62 }
63 
65 {
66  return new RestrictChainToRepackingOperation( *this );
67 }
68 
69 void
71 {
72  runtime_assert(chain_);
73  core::Size const chain_begin( pose.conformation().chain_begin( chain_ ) );
74  core::Size const chain_end( pose.conformation().chain_end( chain_ ) );
75 
77  for( core::Size i( chain_begin ); i<=chain_end; ++i )
78  rrtr.include_residue( i );
79 
80  rrtr.apply( pose, task );
81 }
82 
83 void
85 {
86  runtime_assert( chain );
87  chain_ = chain;
88 }
89 
92 {
93  return chain_;
94 }
95 
96 void
98 {
99  chain( tag->getOption< core::Size >( "chain", 1 ) );
100 }
101 
102 } //namespace protocols
103 } //namespace toolbox
104 } //namespace task_operations