Rosetta
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
combine_silent.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 combine_silent.cc
11 /// @brief simple application for combining a number of silent-files into a
12 /// single silent-file.
13 /// @author James Thompson
14 
15 // libRosetta headers
16 
17 #include <devel/init.hh>
18 
19 #include <basic/options/option.hh>
20 
21 #include <protocols/moves/NullMover.hh>
22 #include <protocols/jobdist/not_universal_main.hh>
23 
24 // C++ headers
25 #include <string>
26 
27 
28 // option key includes
29 
31 #include <basic/options/keys/in.OptionKeys.gen.hh>
32 #include <basic/options/keys/out.OptionKeys.gen.hh>
33 
34 #include <utility/vector1.hh>
36 
37 
38 int
39 main( int argc, char* argv [] ) {
40  try {
41 
42  using namespace basic::options;
43  using namespace basic::options::OptionKeys;
44  // define relevant options
46  OPT( in::file::s );
47  OPT( in::file::l );
49  OPT( in::file::tags );
50  OPT( in::file::silent_struct_type );
51  OPT( in::file::silent_renumber );
52  OPT( in::file::residue_type_set );
54  OPT( out::file::silent_struct_type );
55 
56  // options, random initialization
57  devel::init( argc, argv );
58 
59  std::string usage("");
60  usage += "\n\nusage: combine_silent [options] -in::file::silent <silent_files> or -in::file::s <pdb> or -in::file::l <list of pdb files> \n";
61  usage += "\tTo see a list of other valid options, use the option -help.\n";
62 
63  if ( !option[ in::file::silent ].user() && !option[ in::file::s ].user() && !option[ in::file::l ].user() ) {
64  std::cerr << usage << std::endl;
65  std::exit(1);
66  }
67 
68  protocols::moves::NullMover mover;
69  protocols::jobdist::not_universal_main( mover );
70  } catch ( utility::excn::EXCN_Base const & e ) {
71  std::cout << "caught exception " << e.msg() << std::endl;
72  return -1;
73  }
74 
75  return 0;
76 } // main
ocstream cerr(std::cerr)
Wrapper around std::cerr.
Definition: ocstream.hh:290
virtual std::string const msg() const
Definition: EXCN_Base.hh:70
void init(int argc, char *argv[])
Command line init() version.
Definition: init.cc:23
BooleanOptionKey const user("options:user")
Definition: OptionKeys.hh:40
common derived classes for thrown exceptions
tuple database
rule< Scanner, options_closure::context_t > options
Definition: Tag.cc:377
utility::options::OptionCollection option
OptionCollection global.
Definition: option.cc:45
ocstream cout(std::cout)
Wrapper around std::cout.
Definition: ocstream.hh:287
BooleanOptionKey const exit("options:exit")
Definition: OptionKeys.hh:51
vector1: std::vector with 1-based indexing
int main(int argc, char *argv[])
Program options global and initialization function.
#define OPT(akey)
int const silent
Named verbosity levels.