Rosetta
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
docking_protocol.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 /// @ docking_protocol.cc
11 /// @ author James Thompson, Jeff Gray
12 
13 
14 // Rosetta headers
15 #include <protocols/docking/DockingProtocol.hh>
16 #include <protocols/jd2/JobDistributor.hh>
17 #include <protocols/jd2/util.hh>
18 
19 #include <devel/init.hh>
20 #include <core/types.hh>
21 
22 // Utility headers
23 #include <utility/vector1.hh>
25 //#include <utility/tools/make_vector1.hh>
26 
27 // option key includes
28 #include <basic/options/keys/docking.OptionKeys.gen.hh>
29 #include <basic/options/option.hh>
30 
31 #include <protocols/viewer/viewers.hh>
32 
33 
34 // JQX added below two lines for forcing the code
35 // to use the constant seed in production mode
36 // Sergey believes that in production run,
37 // the -constant_seed is not working properly in Jump.cc file
38 // Please see the details in the Jump.cc file
39 //#include <devel/init.hh> //JQX
40 //#include <numeric/random/random.hh> //JQX
41 
42 
43 ///////////////////////////////////////////////////////////////
44 void*
45 my_main( void* )
46 {
47 
48  using namespace basic::options;
49  using namespace protocols::docking;
50  using namespace protocols::jd2;
51 
54  // initialize core
55 
56  // devel::init_random_generators(3,numeric::random::_RND_TestRun_, "mt19937"); //JQX from Sergery
57 
58  DockingProtocolOP dp( new DockingProtocol() );
59 
60  if ( option[ OptionKeys::docking::multibody ].user() ) {
61  utility::vector1< core::Size > const movable_jumps(
62  option[ OptionKeys::docking::multibody ]()
63  );
64  dp->set_movable_jumps( movable_jumps );
65  }
66 
67  JobDistributor::get_instance()->go(dp);
68 
69  protocols::viewer::clear_conformation_viewers();
70  exit( 0 ); // graceful exit with take down of graphics viewers.
71 
72  return NULL;
73 }
74 
75 
76 ///////////////////////////////////////////////////////////////
77 int
78 main( int argc, char * argv [] )
79 {
80  try {
81 
82  devel::init(argc, argv);
83  protocols::viewer::viewer_main( my_main );
84 
85  } catch ( utility::excn::EXCN_Base const & e ) {
86  std::cout << "caught exception " << e.msg() << std::endl;
87  return -1;
88  }
89 
90 }
91 
virtual std::string const msg() const
Definition: EXCN_Base.hh:70
void register_options()
int main(int argc, char *argv[])
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
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
Program options global and initialization function.
void * my_main(void *)