Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AlignRmsdTargetEvaluatorCreator.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 protocols/comparative_modeling/AlignRmsdTargetEvaluatorCreator.hh
11 /// @brief Header for AlignRmsdTargetEvaluatorCreator
12 /// @author Matthew O'Meara
13 
14 // Unit Headers
16 
17 // Package Headers
19 
20 // Package Headers
26 #include <core/pose/Pose.hh>
27 
28 #include <core/sequence/util.hh>
31 
32 // ObjexxFCL Headers
33 #include <ObjexxFCL/string.functions.hh>
34 
35 // Utility headers
36 #include <utility/pointer/ReferenceCount.hh>
37 #include <utility/vector1.hh>
38 #include <utility/file/FileName.hh>
39 
40 #include <basic/options/option.hh>
41 #include <basic/Tracer.hh>
42 
43 // due to template function
45 
46 
47 // option key includes
48 #include <basic/options/option_macros.hh>
49 #include <basic/options/keys/evaluation.OptionKeys.gen.hh>
50 
52 #include <utility/vector0.hh>
53 
54 
55 #ifdef WIN32
57 #endif
58 
59 
60 static basic::Tracer tr("protocols.comparative_modeling.AlignRmsdTargetEvaluatorCreator");
61 
62 namespace protocols {
63 namespace comparative_modeling {
64 
66 
68  using namespace basic::options;
69  if ( options_registered_ ) return;
70  options_registered_ = true;
71 
72  OPT( evaluation::align_rmsd_target );
73  OPT( evaluation::align_rmsd_column );
74  OPT( evaluation::align_rmsd_fns );
75  OPT( evaluation::align_rmsd_format );
76 
77 }
78 
80  using namespace core;
81  using namespace basic::options;
82  using namespace basic::options::OptionKeys;
83 
84 
85  if ( option[ OptionKeys::evaluation::align_rmsd_target ].user() ) {
86  using std::string;
87  using utility::vector1;
88  vector1< string > const & align_rmsd_target(
89  option[ OptionKeys::evaluation::align_rmsd_target ]()
90  );
91  vector1< string > const & align_rmsd_col_names(
92  option[ OptionKeys::evaluation::align_rmsd_column ]()
93  );
94 
95  vector1< string > align_rmsd_fns;
96  if ( option[ OptionKeys::evaluation::align_rmsd_fns ].user() ) {
97  align_rmsd_fns = option[ OptionKeys::evaluation::align_rmsd_fns ]();
98  }
99  runtime_assert( align_rmsd_target.size() == align_rmsd_col_names.size() );
100  for ( Size ii = 1; ii <= align_rmsd_target.size(); ++ii ) {
101  pose::PoseOP rmsd_pose = new pose::Pose;
102  core::import_pose::pose_from_pdb( *rmsd_pose, align_rmsd_target[ii] );
103  //string const tag( align_rmsd_target[ii] );
104  string const tag( align_rmsd_col_names[ii] );
106  if ( align_rmsd_fns.size() >= ii ) {
108  align_rmsd_fns[ii], option[ OptionKeys::evaluation::align_rmsd_format ]()
109  ).front();
110  }
111  eval.add_evaluation( new Align_RmsdEvaluator(rmsd_pose,tag,true,aln) );
112  eval.add_evaluation( new Align_RotamerEvaluator(rmsd_pose,tag,true,aln) );
113  }
114  }
115 
116 }
117 
119  return "AlignRmsdTargetEvaluator";
120 }
121 
122 } //namespace
123 } //namespace