Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MatchResiduesMover.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 protocolsoped 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/fldsgn/MatchResiduesMover.cc
11 /// @brief
12 /// @author Javier Castellanos ( javiercv@uw.edu )
13 
14 // Unit Headers
17 
18 // Project Headers
19 #include <core/types.hh>
20 #include <core/pose/Pose.hh>
23 #include <core/scoring/rms_util.hh>
24 
25 // Utility headers
26 #include <utility/vector1.hh>
27 #include <basic/Tracer.hh>
28 #include <ObjexxFCL/format.hh>
30 #include <protocols/moves/Mover.hh>
32 #include <utility/exit.hh>
33 
34 // Parser headers
36 #include <protocols/moves/Mover.hh>
37 #include <utility/tag/Tag.hh>
38 #include <utility/string_util.hh>
39 
40 
41 // Boost Headers
42 #include <boost/tuple/tuple.hpp>
43 #include <boost/tuple/tuple_comparison.hpp>
44 #include <boost/lexical_cast.hpp>
45 #define foreach BOOST_FOREACH
46 
47 static basic::Tracer TR("protocols.fldsgn.MatchResiduesMover");
48 
49 namespace protocols {
50 namespace fldsgn {
51 
52 // ------------- Mover Creator -------------
53 
56 
58 MatchResiduesMoverCreator::keyname() const { return "MatchResiduesMover"; }
59 
60 // ------------- Mover Creator -------------
61 
62 // @brief default constructor
64 {}
65 
66 
67 
68 // @brief destructor
70 
73  return new MatchResiduesMover();
74 }
75 
78  return new MatchResiduesMover( *this );
79 }
80 
81 
82 
83 void
85 {
88 
89  VecSize matched_pos;
90  core::Real rms = compute(pose, matched_pos);
91  bool pass( rms < threshold() );
92  if(pass)
94  else
96 
97  if(superimpose_ && pass ){
98  superimpose_comb(pose, matched_pos);
99  }
100 }
101 
102 void
104  utility::tag::TagPtr const tag,
106  protocols::filters::Filters_map const & filters,
107  protocols::moves::Movers_map const & movers,
108  core::pose::Pose const & pose )
109 {
110  MatchResidues::parse_my_tag(tag, data, filters, movers, pose);
111  superimpose_ = tag->getOption< bool >("superimpose", false);
112 }
113 
114 } // fldsgn
115 } // protocols