Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BuildPosition.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 BuildPosition.cc
11 /// @brief Position where motifs are built in MotifSearch
12 /// @author sthyme (sthyme@gmail.com)
13 
14 // Unit Headers
16 
17 // Package Headers
20 
21 // Project Headers
23 
24 #include <utility/vector1.hh>
25 
26 
27 // Utility Headers
28 
29 // C++ Headers
30 
31 namespace protocols {
32 namespace motifs{
33 
35  Size const seqpos,
36  utility::vector1< Size > const & target_positions
37 ) : seqpos_( seqpos ),
38  target_positions_( target_positions ),
39  allowed_types_(),
40  best_rotamers_(0),
41  best_motifs_(0),
42  best_motifhits_(0)
43 {}
44 
45 
47  Size const seqpos,
48  utility::vector1< Size > const & target_positions,
49  std::set< std::string > const & allowed_types
50 ) : seqpos_( seqpos ),
51  target_positions_( target_positions ),
52  allowed_types_( allowed_types ),
53  best_rotamers_(0),
54  best_motifs_(0),
55  best_motifhits_(0)
56 {}
57 
59 {}
60 
62  utility::pointer::ReferenceCount( src ),
63  seqpos_( src.seqpos() ),
64  target_positions_( src.target_positions() ),
65  allowed_types_( src.allowed_types() ),
66  best_rotamers_( src.best_rotamers() ),
67  best_motifs_( src.best_motifs() ),
68  best_motifhits_( src.best_motifhits() )
69 {}
70 
73 {
74  return new BuildPosition(*this);
75 }
76 
77 void
79  core::conformation::Residue const & res
80 )
81 {
82  best_rotamers_.push_back( res.clone() );
83 }
84 
85 void
87  Motif const & motif
88 )
89 {
90  best_motifs_.push_back( motif.clone() );
91 }
92 
93 void
95  MotifHit const & motifhit
96 )
97 {
98  best_motifhits_.push_back( motifhit.clone() );
99 }
100 
101 void
103 {
104  best_rotamers_.clear();
105  best_motifs_.clear();
106 }
107 
108 void
110 {
111  best_rotamers_.clear();
112 }
113 
114 } // namespace motifs
115 } // namespace protocols