Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UpstreamCollisionFilter.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 // :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/output/UpstreamCollisionFilter.hh
12 /// @brief Declaration for class to filter matches where the upstream residues collide.
13 /// @author Alex Zanghellini (zanghell@u.washington.edu)
14 /// @author Andrew Leaver-Fay (aleaverfay@gmail.com), porting to mini
15 
16 #ifndef INCLUDED_protocols_match_output_UpstreamCollisionFilter_hh
17 #define INCLUDED_protocols_match_output_UpstreamCollisionFilter_hh
18 
19 // Unit headers
21 
22 // Package headers
26 
27 // Project headers
29 #include <core/pose/Pose.fwd.hh>
32 
33 
34 // Utility headers
35 #include <utility/pointer/ReferenceCount.hh>
36 
37 #include <utility/vector1.hh>
38 
39 
40 namespace protocols {
41 namespace match {
42 namespace output {
43 
44 
46 
47 public:
48  typedef core::Real Real;
49 
50 public:
51  //MatchCollisionFilter( std::string filter_name );
53 
54  virtual
56 
57  virtual
58  bool
60  match const & m
61  ) const = 0;
62 
63  virtual
64  bool
66  match_dspos1 const & m
67  ) const = 0;
68 
69  //setters
70  void set_filter_by_lj( bool setting );
71  void set_lj_cutoff( Real setting );
72  void set_lj_atr_weight( Real setting );
73  void set_lj_rep_weight( Real setting );
74  void set_lj_sol_weight( Real setting );
75 
76  virtual
77  void set_tolerated_overlap( Real setting );
78 
79  //getters
80  bool filter_by_lj() const;
81  Real wfa_atr() const;
82  Real wfa_rep() const;
83  Real wfa_sol() const;
84  Real lj_cutoff() const;
85  Real tolerated_overlap() const;
86 
90  BumpGridCOP bump_grid() const;
91 
92 
93 protected:
95 
96 private:
103 
106 
109 
110 
111 
112 };
113 
114 /// @brief This class is used to detect collisions between the upstream residues
115 /// and filter out matches that have too much collision. It can perform either
116 /// hard-sphere collision detection, or score-function (Etable) driven collision
117 /// detection. Four command-line flags are read by the MatcherTask to initialize
118 /// this class:
119 /// match::filter_colliding_upstream_residues
120 /// match::upstream_residue_collision_tolerance
121 /// match::upstream_residue_collision_score_cutoff
122 /// match::upstream_residue_collision_Wfa_atr
123 /// match::upstream_residue_collision_Wfa_rep
124 /// match::upstream_residue_collision_Wfa_sol
126 public:
127  typedef core::Real Real;
129 
130 public:
131  //UpstreamCollisionFilter( std::string filter_name );
133 
134  virtual
136 
137  /// @brief Returns true if the given match does not contain too much residue-pair collision.
138  virtual
139  bool
141  match const & m
142  ) const;
143 
144  /// @brief Returns true if the given match does not contain too much residue-pair collision.
145  virtual
146  bool
148  match_dspos1 const & m
149  ) const;
150 
151  bool
153  core::Size geomcst_a,
154  core::Size geomcst_b,
155  Hit const & upstream_hit_a,
156  Hit const & upstream_hit_b
157  ) const;
158 
159  inline
160  bool
162  core::conformation::Residue const & resA,
163  core::conformation::Residue const & resB
164  ) const
165  {
166  for ( Size ii = resA.first_sidechain_atom(); ii <= resA.nheavyatoms(); ++ii ) {
168  for ( Size jj = resB.first_sidechain_atom(); jj <= resB.nheavyatoms(); ++jj ) {
170  Real minsep = bump_grid()->required_separation_distance( ii_rad, jj_rad );
171  if ( resA.xyz( ii ).distance_squared( resB.xyz( jj )) < minsep * minsep ) {
172  return false;
173  }
174  }
175  }
176  return true;
177  }
178 
179 private:
180 
181 };
182 
183 
184 }
185 }
186 }
187 
188 #endif