Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AlignEvaluator.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 AlignEvaluator
11 /// @author James Thompson
12 
15 #include <core/pose/Pose.hh>
16 
17 #include <basic/Tracer.hh>
18 // AUTO-REMOVED #include <core/scoring/rms_util.hh>
19 #include <core/sequence/util.hh>
23 // AUTO-REMOVED #include <core/conformation/Residue.hh>
24 
25 // AUTO-REMOVED #include <ObjexxFCL/FArray2D.hh>
26 
27 #include <numeric/xyzVector.hh>
28 // AUTO-REMOVED #include <numeric/model_quality/rms.hh>
29 
31 #include <core/id/types.hh>
32 #include <utility/vector1.hh>
33 
34 
35 // C++ headers
36 
37 static basic::Tracer tr("protocols.evaluation.AlignEvaluator");
38 
39 namespace protocols {
40 namespace evaluation {
41 
43 
45  core::pose::PoseCOP native_pose,
46  std::string tag,
47  bool report_aln_components,
49 ) :
50  SingleValuePoseEvaluator< core::Real >("align_rms" + tag),
51  native_pose_(native_pose),
52  tag_(tag),
53  report_aln_components_(report_aln_components),
54  aln_(aln)
55 {}
56 
58  core::pose::Pose const & pose
59 ) const {
60  if ( aln_ ) return aln_;
61  // calculate a naive alignment if we don't already have an alignment.
62  using namespace core::sequence;
63  SequenceOP model_seq ( new Sequence( pose.sequence(), "model", 1 ) );
64  SequenceOP native_seq( new Sequence( native_pose_->sequence(), "native", 1 ) );
65  tr.Debug << "aligning: " << std::endl;
66  tr.Debug << model_seq ->to_string() << std::endl;
67  tr.Debug << native_seq->to_string() << std::endl;
69  *aln_op = align_naive(model_seq,native_seq);
70  tr.Debug << "alignment: " << std::endl;
71  tr.Debug << *aln_op;
72  tr.flush_all_channels();
73  return aln_op;
74 }
75 
76 
77 void AlignEvaluator::report_aln_components( bool const setting ) {
78  report_aln_components_ = setting;
79 }
80 
83 }
84 
86  return tag_;
87 }
88 
90  return native_pose_;
91 }
92 
93 } // evaluation
94 } // protocols