Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MedalMain.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/medal/MedalMain.cc
11 /// @author Christopher Miles (cmiles@uw.edu)
12 
13 // Unit header
15 
16 // C/C++ headers
17 #include <string>
18 
19 // Utility headers
20 #include <basic/Tracer.hh>
21 #include <basic/options/option.hh>
22 #include <basic/options/keys/OptionKeys.hh>
23 #include <basic/options/keys/cm.OptionKeys.gen.hh>
24 #include <basic/options/keys/in.OptionKeys.gen.hh>
25 #include <utility/exit.hh>
26 #include <utility/excn/EXCN_Base.hh>
27 
28 // Project headers
30 #include <protocols/moves/Mover.hh>
31 
32 // Package headers
35 
36 namespace protocols {
37 namespace medal {
38 
39 const std::string ERROR_PREFIX = "Failed to specify required option ";
40 
41 /// @detail Standard options
43  using namespace basic::options;
44  using namespace basic::options::OptionKeys;
45 
46  if (!option[in::file::fasta].user())
47  utility_exit_with_message(ERROR_PREFIX + "-in:file:fasta");
48 
49  if (!option[in::file::frag3].user())
50  utility_exit_with_message(ERROR_PREFIX + "-in:file:frag3");
51 }
52 
53 /// @detail Comparative modeling options
55  using namespace basic::options;
56  using namespace basic::options::OptionKeys;
57 
58  if (!option[cm::aln_format].user())
59  utility_exit_with_message(ERROR_PREFIX + "-cm:aln_format");
60 
61  if (!option[in::file::alignment].user())
62  utility_exit_with_message(ERROR_PREFIX + "-in:file:alignment");
63 
64  if (!option[in::file::template_pdb].user())
65  utility_exit_with_message(ERROR_PREFIX + "-in:file:template_pdb");
66 }
67 
70 
71  try {
72  JobDistributor::get_instance()->go(mover);
73  } catch (utility::excn::EXCN_Base& e) {
74  std::cerr << "Exception: " << std::endl;
75  e.show(std::cerr);
76  }
77  return 0;
78 }
79 
80 void* Medal_main(void*) {
83  return graphics_main(new MedalMover());
84 }
85 
86 void* MedalExchange_main(void*) {
89  return graphics_main(new MedalExchangeMover());
90 }
91 
92 } // namespace medal
93 } // namespace protocols