Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PoseInserter.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 // :noTabs=false:tabSize=4:indentSize=4:
4 //
5 // (c) Copyright Rosetta Commons Member Institutions.
6 // (c) This file is part of the Rosetta software suite and is made available under license.
7 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
8 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
9 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
10 
11 /// @file protocols/match/PoseInserter.cc
12 /// @brief
13 /// @author Alex Zanghellini (zanghell@u.washington.edu)
14 /// @author Andrew Leaver-Fay (aleaverfay@gmail.com), porting to mini
15 
16 // Unit headers
18 
19 // Project headers
20 // AUTO-REMOVED #include <core/conformation/Residue.hh>
21 #include <core/pose/Pose.hh>
22 
23 // Utility headers
24 #include <utility/exit.hh>
25 
26 #include <utility/vector1.hh>
27 
28 
29 // C++ headers
30 
31 namespace protocols {
32 namespace match {
33 namespace output {
34 
35 PoseInserter::PoseInserter( Pose & pose_to_modify ) :
36  pose_( pose_to_modify ),
37  resid_to_replace_( 0 )
38 {}
39 
40 PoseInserter::PoseInserter( Pose & pose_to_modify, Size resid_to_replace ) :
41  pose_( pose_to_modify ),
42  resid_to_replace_( resid_to_replace )
43 {}
44 
46 
47 /// @brief Take a conformation::Residue from the upstream builder and
48 /// call Pose::replace_residue at a particular position.
49 void
51  Hit const &,
52  core::conformation::Residue const & upstream_conformation
53 )
54 {
55  runtime_assert( resid_to_replace_ != 0 );
56 
57  pose_.replace_residue( resid_to_replace_, upstream_conformation, false );
58 
59 }
60 
61 void
63 {
64  resid_to_replace_ = seqpos;
65 }
66 
67 }
68 }
69 }
70