Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ConstraintEvaluatorWrapperCreator.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
17 // Package Headers
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.topology_broker.ConstraintEvaluatorWrapperCreator");
51 
52 namespace protocols {
53 namespace topology_broker {
54 
56 
58  using namespace basic::options;
59  if ( options_registered_ ) return;
60  options_registered_ = true;
61 
62  OPT( evaluation::combined_constraints );
63  OPT( evaluation::combined_constraints_column );
64 
65 }
66 
68  using namespace core;
69  using namespace basic::options;
70  using namespace basic::options::OptionKeys;
71 
72  if ( option[ OptionKeys::evaluation::combined_constraints ].user() ) {
73  /*
74  this creates Evaluators to evaluate different constraint sets against your decoys
75  pls: provide also as many column-names to match your constraint sets
76  ---
77  */
78  utility::vector1< std::string > const& cst_target( option[ OptionKeys::evaluation::combined_constraints ]() );
79  utility::vector1< std::string > const& cst_col_name( option[ OptionKeys::evaluation::combined_constraints_column ]() );
80  for ( Size ct = 1; ct <= cst_target.size(); ct ++ ) {
81  std::string tag( ObjexxFCL::string_of( ct ) );
82  if ( cst_col_name.size() >= ct ) tag = cst_col_name[ ct ];
84  new topology_broker::ConstraintClaimer( cst_target[ ct ], tag );
85  cst->set_combine_ratio( 2 );
86  cst->set_fullatom( true );
87  cst->set_centroid( false );
88  cst->set_filter_weight( 1 );
89  cst->set_skip_redundant( 1 );
90  eval.add_evaluation( new ConstraintEvaluatorWrapper( cst->tag(), cst ) );
91  }
92  }
93 }
94 
96  return "ConstraintEvaluator";
97 }
98 
99 } //namespace
100 } //namespace