Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ChemicalShiftEvaluatorCreator.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/evaluation/ChemicalShiftsEvaluatorCreator.hh
11 /// @brief Header for ChemicalShiftsEvaluatorCreator
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 
33 #include <utility/file/FileName.hh>
34 
35 #include <basic/options/option.hh>
36 #include <basic/Tracer.hh>
37 
38 // due to template function
40 
41 // option key includes
42 #include <basic/options/option_macros.hh>
43 #include <basic/options/keys/evaluation.OptionKeys.gen.hh>
44 
45 #include <utility/vector0.hh>
46 
47 //Auto Headers
48 
49 
50 static basic::Tracer tr("protocols.sparta.ChemicalShiftEvaluatorCreator");
51 
52 namespace protocols {
53 namespace sparta {
54 
56 
58  using namespace basic::options;
59  if ( options_registered_ ) return;
60  options_registered_ = true;
61 
62  OPT( evaluation::chemical_shifts );
63 
64 }
65 
67  using namespace core;
68  using namespace basic::options;
69  using namespace basic::options::OptionKeys;
70 
71 
72  if ( option[ OptionKeys::evaluation::chemical_shifts ].user() ) {
73  typedef utility::vector1< std::string > CSVector;
74  CSVector const& cs_shifts( option[ OptionKeys::evaluation::chemical_shifts ]() );
75 
76  for ( CSVector::const_iterator it=cs_shifts.begin(); it!=cs_shifts.end(); ++it ) {
77  std::string fname( *it );
78  std::string column;
79  ++it;
80  if ( it != cs_shifts.end() ) {
81  column = *it;
82  } else {
83  utility_exit_with_message(
84  "need to specify dupletss <cs_shifts> <column> with option -evaluation:chemical_shifts last read: "+fname );
85  }
86  eval.add_evaluation( new ChemicalShiftEvaluator( column, fname ) );
87  }
88  }
89 
90 
91 
92 }
93 
95  return "ChemicalShiftEvaluator";
96 }
97 
98 } //namespace
99 } //namespace