Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ConstraintEvaluatorCreator.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/constraints_additional/ConstraintsEvaluatorCreator.hh
11 /// @brief Header for ConstraintsEvaluatorCreator
12 /// @author Matthew O'Meara
13 
14 // Unit Headers
16 
17 // Package Headers
19 
20 // Package Headers
25 
26 // ObjexxFCL Headers
27 #include <ObjexxFCL/string.functions.hh>
28 
29 // Utility headers
30 #include <utility/pointer/ReferenceCount.hh>
31 #include <utility/vector1.hh>
32 #include <utility/file/FileName.hh>
33 
34 #include <basic/options/option.hh>
35 #include <basic/Tracer.hh>
36 
37 // due to template function
39 
40 // option key includes
41 #include <basic/options/option_macros.hh>
42 #include <basic/options/keys/evaluation.OptionKeys.gen.hh>
43 #include <utility/vector0.hh>
44 
45 #ifdef WIN32
47 #endif
48 
49 
50 static basic::Tracer tr("protocols.constraints_additional.ConstraintEvaluatorCreator");
51 
52 namespace protocols {
53 namespace constraints_additional {
54 
56 
58  using namespace basic::options;
59  if ( options_registered_ ) return;
60  options_registered_ = true;
61 
62  OPT( evaluation::constraints );
63  OPT( evaluation::constraints_column );
64 
65 }
66 
68  using namespace core;
69  using namespace basic::options;
70  using namespace basic::options::OptionKeys;
71 
72 
73  if ( option[ OptionKeys::evaluation::constraints ].user() ) {
74  /*
75  this creates Evaluators to evaluate different constraint sets against your decoys
76  pls: provide also as many column-names to match your constraint sets
77  ---
78  */
79  utility::vector1< std::string > const& cst_target( option[ OptionKeys::evaluation::constraints ]() );
80  utility::vector1< std::string > const& cst_col_name( option[ OptionKeys::evaluation::constraints_column ]() );
81  for ( Size ct = 1; ct <= cst_target.size(); ct ++ ) {
82  std::string tag( ObjexxFCL::string_of( ct ) );
83  if ( cst_col_name.size() >= ct ) tag = cst_col_name[ ct ];
84  eval.add_evaluation( new ConstraintEvaluator( tag, cst_target[ ct ] ) );
85  }
86  }
87 
88 }
89 
91  return "ConstraintEvaluator";
92 }
93 
94 } //namespace
95 } //namespace