Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PalesEvaluatorCreator.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/simple_filters/PalesEvaluatorCreator.hh
11 /// @brief Header for PalesEvaluatorCreator
12 /// @author Matthew O'Meara
13 
14 // Unit Headers
16 
17 // Package Headers
19 
20 // Package Headers
23 
25 
27 
28 // ObjexxFCL Headers
29 #include <ObjexxFCL/string.functions.hh>
30 
31 // Utility headers
32 #include <utility/pointer/ReferenceCount.hh>
33 #include <utility/vector1.hh>
34 #include <utility/file/FileName.hh>
35 
36 #include <basic/options/option.hh>
37 #include <basic/Tracer.hh>
38 
39 //// C++ headers
40 
41 // due to template function
43 
44 
45 // option key includes
46 #include <basic/options/option_macros.hh>
47 #include <basic/options/keys/evaluation.OptionKeys.gen.hh>
48 
49 #include <utility/vector0.hh>
50 
51 //Auto Headers
52 
53 
54 #ifdef WIN32
56 #endif
57 
58 
59 static basic::Tracer tr("protocols.evalution.PalesEvaluatorCreator");
60 
61 namespace protocols {
62 namespace simple_filters {
63 
65 
67  using namespace basic::options;
68  if ( options_registered_ ) return;
69  options_registered_ = true;
70 
71  OPT( evaluation::pales );
72 
73 }
74 
76  using namespace core;
77  using namespace basic::options;
78  using namespace basic::options::OptionKeys;
79 
80 
81  if ( option[ OptionKeys::evaluation::pales ].user() ) {
82  typedef utility::vector1< std::string > CSVector;
83  CSVector const& pales( option[ OptionKeys::evaluation::pales ]() );
84 
85  for ( CSVector::const_iterator it=pales.begin(); it!=pales.end(); ++it ) {
86  std::string fname( *it );
87  std::string column;
88  ++it;
89  if ( it != pales.end() ) {
90  column = *it;
91  } else {
92  utility_exit_with_message(
93  "need to specify dupletss <pales_rdcs> <column> with option -evaluation:pales last read: "+fname );
94  }
95  eval.add_evaluation( new PalesEvaluator( column, fname ) );
96  }
97  }
98 
99 }
100 
102  return "PalesEvaluatorCreator";
103 }
104 
105 } //namespace
106 } //namespace