Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PreventChainFromRepackingOperation.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/PreventChainFromRepackingOperation.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.PreventChainFromRepackingOperation" );
41 
42 namespace protocols {
43 namespace toolbox {
44 namespace task_operations {
45 
46 using namespace core::pack::task::operation;
47 
49 
51  : parent(), chain_( chain )
52 {
53 }
54 
56 
59 {
61 }
62 
64 {
65  return new PreventChainFromRepackingOperation( *this );
66 }
67 
68 void
70 {
71  runtime_assert(chain_);
72  core::Size const chain_begin( pose.conformation().chain_begin( chain_ ) );
73  core::Size const chain_end( pose.conformation().chain_end( chain_ ) );
74 
76  for( core::Size i( chain_begin ); i<=chain_end; ++i )
77  pp.include_residue( i );
78 
79  pp.apply( pose, task );
80 }
81 
82 void
84 {
85  runtime_assert( chain );
86  chain_ = chain;
87 }
88 
91 {
92  return chain_;
93 }
94 
95 void
97 {
98  chain( tag->getOption< core::Size >( "chain", 1 ) );
99 }
100 
101 } //namespace protocols
102 } //namespace toolbox
103 } //namespace task_operations