Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CombinedConstraintEvaluatorCreator.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/CombinedConstraintsEvaluatorCreator.hh
11 /// @brief Header for CombinedConstraintsEvaluatorCreator
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 
41 // option key includes
42 #include <basic/options/option_macros.hh>
43 #include <basic/options/keys/evaluation.OptionKeys.gen.hh>
44 #include <utility/vector0.hh>
45 
46 #ifdef WIN32
48 #endif
49 
50 
51 static basic::Tracer tr("protocols.evalution.CombinedConstraintsEvaluatorCreator");
52 
53 namespace protocols {
54 namespace constraints_additional {
55 
57 
59  using namespace basic::options;
60  if ( options_registered_ ) return;
61  options_registered_ = true;
62 
63  OPT( evaluation::combined_constraints );
64  OPT( evaluation::combined_constraints_column );
65  OPT( evaluation::combine_statistics );
66 
67 }
68 
70  using namespace core;
71  using namespace basic::options;
72  using namespace basic::options::OptionKeys;
73 
74 
75  if ( option[ OptionKeys::evaluation::combined_constraints ].user() ) {
76  utility::vector1< std::string > const& cst_target( option[ OptionKeys::evaluation::combined_constraints ]() );
77  utility::vector1< std::string > const& cst_col_name( option[ OptionKeys::evaluation::combined_constraints_column ]() );
78  for ( Size ct = 1; ct <= cst_target.size(); ct ++ ) {
79  std::string tag( ObjexxFCL::string_of( ct ) );
80  if ( cst_col_name.size() >= ct ) tag = cst_col_name[ ct ];
81  eval.add_evaluation( new CombinedConstraintEvaluator( tag, cst_target[ ct ], 2, option[ OptionKeys::evaluation::combine_statistics ] ) );
82  }
83  }
84 
85 }
86 
88  return "CombinedConstraintEvaluator";
89 }
90 
91 } //namespace
92 } //namespace