Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Interface.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 Interface - information about the interface between to partners
11 /// @brief contains the following information:
12 /// calculate the interface between the two (or other?) partners
13 /// set the packer task to only pack the interface
14 /// @author Monica Berrondo
15 
16 
17 #ifndef INCLUDED_protocols_scoring_Interface_hh
18 #define INCLUDED_protocols_scoring_Interface_hh
19 
20 // Unit headers
22 
23 // Package headers
24 #include <core/types.hh>
25 #include <core/conformation/Residue.fwd.hh> // replace with .fwd.hh
27 #include <core/pose/Pose.fwd.hh>
28 
29 // Symmetry headers
30 // AUTO-REMOVED #include <core/conformation/symmetry/SymmetryInfo.fwd.hh>
31 // AUTO-REMOVED #include <core/conformation/symmetry/SymmetricConformation.fwd.hh>
32 
33 // Utility headers
34 #include <ObjexxFCL/FArray1D.hh>
35 // AUTO-REMOVED #include <utility/vector1.hh>
36 #include <utility/pointer/ReferenceCount.hh>
37 
38 #include <utility/vector1.hh>
39 
40 
41 namespace protocols {
42 namespace scoring {
43 
44 class
46 public:
47 
49  typedef core::Real Real;
50 
51 
52  // default constructor
54  jump_number_ = 1;
55  distance_squared_ = 8.0 * 8.0;
56  use_input_partners_ = false;
57  }
58 
59  // constructor with arguments
61  Size const jump_number_in
62  ) : jump_number_( jump_number_in )
63  {
64  // set the default distance to 8 Angstrom (for cendist)
65  // is this the correct number for a default?
66  distance_squared_ = 8.0 * 8.0;
67  use_input_partners_ = false;
68  }
69 
71  ObjexxFCL::FArray1D_bool partner
72  )
73  {
74  partner_ = partner;
75  // set the default distance to 8 Angstrom (for cendist)
76  // is this the correct number for a default?
77  distance_squared_ = 8.0 * 8.0;
78  use_input_partners_ = true;
79  }
80 
81  void jump( Size const jump_number);
82 
83  core::Size jump_id() const {
84  return jump_number_;
85  }
86 
87  void calculate( core::pose::Pose const & pose );
88  void print( core::pose::Pose const & pose );
89  void show( core::pose::Pose const & pose );
90  void set_pack( core::pose::Pose const & pose, PackerTaskOP task );
91 
92  core::Size closest_interface_residue( core::pose::Pose const & pose, core::Size src_rsd, core::Real & distance );
93 
94  void distance( Real const distance_in );
95 
96  core::Vector center( core::pose::Pose const & pose );
97 
98  bool is_interface( core::conformation::Residue const & rsd ) const;// { return is_interface_( rsd.seqpos() ); }
99 
100  bool is_interface( Size const position ) const;// { return is_interface_(position); }
101 
102  /// @brief returns the total number of residues on both sides of the interface for
103  /// a given jump
104  Size interface_nres();
105 
106  /// @brief returns whether the rsd1 and rsd2 are considered a contact pair
107  /// based on contact_list_ array
108  bool is_pair(
109  core::conformation::Residue const & rsd1,
110  core::conformation::Residue const & rsd2
111  );
112  // symmetric interfaces
113  void set_symmetric_pack( core::pose::Pose const & pose, PackerTaskOP task );
114 
115  /// @brief Get two lists containing the residues on each side of the interface
116  ///
117  /// You might expect something called pair_list() to output pairs or somehow
118  /// relate to the is_pair function, but it does not.
119  /// It returns a two element list.
120  /// - The first element is a list of all residues on the lower partner of the
121  /// interface.
122  /// - The second element is a list of all the residues in the interface on the
123  /// upper partner.
124  /// Both lists are sorted by residue number, so the indices of one list have
125  /// no relationship to the other list.
126  /// @todo rename this to something more logical & give it a better return type
127  /// @todo make a function that returns a vector1<pair<Size,Size> > containing
128  /// all interacting pairs. This would be easy to implement.
130 
131  /// @brief The contact_list is pose.total_residue() long, each element
132  /// (contact_list_[i]) contains a list of residues from the other partner that
133  /// interacts with residue i. This is calculated in protein_calculate, and
134  /// used by Interface.is_pair() function as well as the interchain_vdw,
135  /// interchain_env, and interchain_pair scoring components.
137 
138 private:
141  ObjexxFCL::FArray1D_bool partner_;
142  ObjexxFCL::FArray1D_bool is_interface_;
145  //std::vector < bool > is_interface_;
147 
148  void protein_calculate( core::pose::Pose const & pose );
149  void ligand_calculate( core::pose::Pose const & pose );
150  void NA_calculate( core::pose::Pose const & ); //currently set to protein_calculate()
151  void symmetric_protein_calculate( core::pose::Pose const & pose );
152 };
153 
154 } // namespace scoring
155 } // namespace protocols
156 
157 #endif