Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StarAbinitioMain.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/star/StarAbinitioMain.cc
11 /// @author Christopher Miles (cmiles@uw.edu)
12 
13 // Unit header
15 
16 // C/C++ headers
17 #include <iostream>
18 #include <string>
19 
20 // Utility headers
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
34 
35 namespace protocols {
36 namespace star {
37 
38 const std::string ERROR_PREFIX = "Failed to specify required option ";
39 
41  using namespace basic::options;
42  using namespace basic::options::OptionKeys;
43 
44  if (!option[in::file::fasta].user())
45  utility_exit_with_message(ERROR_PREFIX + "-in:file:fasta");
46 
47  if (!option[in::file::frag3].user())
48  utility_exit_with_message(ERROR_PREFIX + "-in:file:frag3");
49 
50  if (!option[in::file::frag9].user())
51  utility_exit_with_message(ERROR_PREFIX + "-in:file:frag9");
52 
53  if (!option[cm::aln_format].user())
54  utility_exit_with_message(ERROR_PREFIX + "-cm:aln_format");
55 
56  if (!option[in::file::alignment].user())
57  utility_exit_with_message(ERROR_PREFIX + "-in:file:alignment");
58 
59  if (!option[in::file::template_pdb].user())
60  utility_exit_with_message(ERROR_PREFIX + "-in:file:template_pdb");
61 }
62 
65 
66  try {
67  JobDistributor::get_instance()->go(mover);
68  } catch (utility::excn::EXCN_Base& e) {
69  std::cerr << "Exception: " << std::endl;
70  e.show(std::cerr);
71  }
72  return 0;
73 }
74 
75 void* StarAbinitio_main(void*) {
77  return graphics_main(new StarAbinitio());
78 }
79 
80 } // namespace star
81 } // namespace protocols