Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HotspotStub.hh
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
11 /// @brief
12 /// @author John Karanicolas, Jacob Corn (jecorn@u.washington.edu)
13 
14 #ifndef INCLUDED_protocols_hotspot_hashing_HotspotStub_hh
15 #define INCLUDED_protocols_hotspot_hashing_HotspotStub_hh
16 
17 // Unit headers
19 // AUTO-REMOVED #include <protocols/hotspot_hashing/HotspotStubSet.hh>
21 #include <core/pose/Pose.hh>
23 
24 // Utility Headers
25 #include <core/types.hh>
26 #include <utility/pointer/ReferenceCount.hh>
27 #include <utility/pointer/owning_ptr.hh>
28 
29 #include <utility/vector1.hh>
30 
31 namespace protocols {
32 namespace hotspot_hashing {
33 
34 enum StubStatus {
35  reject=1, // stub is not compatible with scaffold position[i]
36  accept, // stub is compatible with scaffold position[i]
37  unchecked // stub has not been checked yet
38 };
39 
41 public:
42  /// @brief no-argument constructor REQUIRED FOR WINDOWS
44 
45  //SJF do we need to instantiate the filter at construction? At that point, we don't actually know what filter we would
46  // use...
48  core::Real const bonus_value,
49  core::pose::PoseOP pose,
50  core::Size chain_to_design,
52 
53  HotspotStub( HotspotStub const & src );
54 
55  virtual ~HotspotStub();
56 
57 #ifndef BOINC // gives windows build error
58 #ifndef WIN32 // gives windows build error
59  HotspotStub & operator=( HotspotStub const & src );
60  bool operator<( HotspotStub const & right ) const ;
61 #endif
62 #endif
63 
64  /// @brief Return this potential hotspot's bonus value
65  core::Real bonus_value() const;
66 
67  /// @brief Return the residue associated with this potential hotspot
69 
70  /// @brief Set status at position
71  void set_scaffold_status( core::Size const seqpos, StubStatus const status );
72 
73  /// @brief Get status at position (setting status if not set)
74  bool get_scaffold_status( core::Size const seqpos );
75 
77 
78  /// @brief find the residue that's closest to the stub on chain_to_design_
79  core::Size get_nearest_residue( core::pose::Pose const & pose ) const;
80 
81 private:
82  friend class HotspotStubSet;
85  core::pose::PoseOP pose_; // SJF DANGEROUS to make this an OP, but copying the pose for each operation is too costly
88 
89  // 0 = stub is not compatible with scaffold position[i]
90  // 1 = stub is compatible with scaffold position[i]
91  // 2 = stub has not been checked yet
92  // nonconst, since it can be modified by the containing stubset
93  std::vector<StubStatus> scaffold_status_;
94 
95  /// @brief Associate this stub with its set's scaffold for design
96  void pair_with_scaffold( );
98 
99  /// @brief Check the stub's match to scaffold position
100  bool scaffold_match( core::Size const seqpos );
101 };
102 
103 } // namespace hotspot_hashing
104 } // namespace protocols
105 
106 #endif