Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SymmetricMotifFilter.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 protocols/simplefilters/SymmetricMotifFilter.hh
11 /// @brief position-independent RMS filter evaluating how close a set of interfaces is to symmetric
12 /// @author Frank DiMaio
13 
14 #ifndef INCLUDED_protocols_simple_filters_SymmetricMotifFilter_hh
15 #define INCLUDED_protocols_simple_filters_SymmetricMotifFilter_hh
16 
17 
18 #include <core/pose/Pose.fwd.hh>
19 #include <core/types.hh>
21 #include <utility/tag/Tag.fwd.hh>
22 #include <list>
23 
24 #include <utility/vector1.hh>
25 
26 #include <numeric/xyzVector.hh>
27 #include <numeric/xyzMatrix.hh>
28 #include <numeric/xyz.functions.hh>
29 
30 
31 namespace protocols {
32 namespace simple_filters {
33 
34 struct Quat { core::Real x,y,z,w; };
41 
42 //
44 {
45 public:
48  utility::vector1<core::pose::PoseOP> reference_motifs,
49  std::string symm_type_in="D2");
50 
51  void set_defaults();
52 
53  bool apply( core::pose::Pose const & pose ) const;
54 
55  void add_motif( core::pose::PoseOP motif );
56  void set_symm( std::string symm_type_in ) { symm_type_ = symm_type_in; };
57 
58  void set_thresholds( core::Real angle_thresh_in, core::Real trans_thresh_in, core::Real rmsd_thresh_in, core::Size /*clash_thresh_in*/ ) {
59  angle_thresh_ = angle_thresh_in;
60  trans_thresh_ = trans_thresh_in;
61  rmsd_thresh_ = rmsd_thresh_in;
62  }
63 
64  void set_weights( core::Real angle_thresh_in, core::Real trans_thresh_in, core::Real rmsd_thresh_in ) {
65  angle_thresh_ = angle_thresh_in;
66  trans_thresh_ = trans_thresh_in;
67  rmsd_thresh_ = rmsd_thresh_in;
68  }
69 
70  // call after all motifs are added; verifies motifs are of correct symmetry & precomputes all transformations
71  void process_motifs();
72 
75 
76  void report( std::ostream & out, core::pose::Pose const & pose ) const;
77 
78  // compute angle and rms offsets
79  bool compute( core::pose::Pose const & pose, core::Real &best_score, std::string &motifhit ) const;
80 
81  // symmetry-specific variants
82  bool compute_d2( core::pose::Pose const & pose, core::Real &best_score, std::string &motifhit ) const;
84  if (rms<=rmsd_thresh_ && angle<=angle_thresh_ && clash<=clash_thresh_) {
85  return(
86  angle_wt_ * (angle-angle_thresh_)
87  + rmsd_wt_ * (rms-rmsd_thresh_)
88  + trans_wt_ * (trans-trans_thresh_)
89  + clash_wt_ * (clash-((int)clash_thresh_)) );
90  } else {
91  return(999); // very large
92  }
93  }
94 
95 
96  core::Real report_sm( core::pose::Pose const & pose ) const;
97 
98  virtual ~SymmetricMotifFilter();
99 
100  void parse_my_tag(
101  utility::tag::TagPtr const tag,
102  protocols::moves::DataMap & data_map,
105  core::pose::Pose const & reference_pose );
106 
107 private:
108  // symmetry group and motifs
112 
113  // filter parameters
114  // * cutoffs for pass/fail
117  // * weights for report_sm
119 
120  // force the motifs to a particular location
122 
123  // motif coords & transformations
131 };
132 
133 } // filters
134 }
135 
136 #endif //INCLUDED_protocols_protein_interface_design_filters_SymmetricMotifFilter_HH_
137