Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PoseFilter_RMSD_Screen.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 PoseFilter_RMSD_Screen
11 /// @brief Subclass of PoseFilter
12 /// @detailed
13 /// @author Rhiju Das
14 
15 
16 //////////////////////////////////
18 #include <core/types.hh>
19 #include <core/pose/Pose.hh>
20 #include <core/scoring/rms_util.hh>
22 #include <utility/exit.hh>
23 #include <ObjexxFCL/string.functions.hh>
24 
25 //Auto Headers
26 #include <utility/vector1.hh>
27 
28 using namespace core;
29 
30 namespace protocols {
31 namespace swa {
32 
33  //////////////////////////////////////////////////////////////////////////
34  //constructor!
35  PoseFilter_RMSD_Screen::PoseFilter_RMSD_Screen( utility::vector1< Size > const calc_rms_res,
36  core::pose::PoseCOP native_pose,
37  Real const rmsd_cutoff,
38  bool const force_align ):
39  calc_rms_res_( calc_rms_res ),
40  native_pose_( native_pose ),
41  rmsd_cutoff_( rmsd_cutoff ),
42  force_align_( force_align ),
43  cluster_by_all_atom_rmsd_( false ) // currently disabled -- need to fix for RNA.
44  {
46  }
47 
48  //////////////////////////////////////////////////////////////////////////
49  bool
51 
52  using namespace core::scoring;
53 
54  Real rmsd( 0.0 );
55 
56  if ( calc_rms_res_.size() == 0 ) {
58  } else if ( force_align_ ) {
60  } else {
61  // assumes prealignment of poses!!!
64  }
65 
66  if ( rmsd < rmsd_cutoff_ ) {
67  //std::cout << "YES DID PASS RMSD FILTER: " << rmsd << " " << rmsd_cutoff_ << std::endl;
68  return true;
69  }
70 
71  //std::cout << "DID NOT PASS RMSD FILTER: " << rmsd << " " << rmsd_cutoff_ << std::endl;
72  return false;
73  }
74 
75 
76 
77  /////////////////////////////////////////////////////////////////////
78  void
80  using namespace core::scoring;
81 
82  // presumably can figure this out based on whether protein or RNA. anyway.
85  } else {
87  }
88 
89  }
90 
91 
92 }
93 }