Rosetta
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
backrub.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 backrub.cc
11 /// @brief run backrub Monte Carlo
12 /// @author Colin A. Smith (colin.smith@mpibpc.mpg.de)
13 /// @detailed
14 /// Currently a work in progress. The goal is to match the features of rosetta++ -backrub_mc
15 
16 
17 #include <devel/init.hh>
18 
19 
20 // Protocols Headers
21 #include <protocols/jd2/JobDistributor.hh>
22 #include <protocols/backrub/BackrubProtocol.hh>
23 #include <protocols/canonical_sampling/PDBTrajectoryRecorder.hh>
24 #include <protocols/viewer/viewers.hh>
25 
26 // Core Headers
27 #include <core/kinematics/MoveMap.hh>
28 #include <core/pose/Pose.hh>
29 #include <core/types.hh>
30 
31 
32 // Utility Headers
33 #include <utility/vector1.hh>
35 
36 // Numeric Headers
37 #include <numeric/random/random.hh>
38 
39 // Platform Headers
40 #include <platform/types.hh>
41 
42 // option key includes
43 #include <basic/Tracer.hh>
44 #include <basic/options/option.hh>
46 #include <basic/options/keys/out.OptionKeys.gen.hh>
47 #include <basic/options/keys/constraints.OptionKeys.gen.hh>
48 #include <basic/options/keys/in.OptionKeys.gen.hh>
49 #include <basic/options/keys/backrub.OptionKeys.gen.hh>
50 #include <basic/options/keys/packing.OptionKeys.gen.hh>
51 
52 void *
53 my_main( void* );
54 
55 int
56 main( int argc, char * argv [] )
57 {
58  try {
59 
62  OPT(in::file::l);
64  OPT(in::ignore_unrecognized_res);
66  OPT(packing::resfile);
67  OPT(constraints::cst_fa_weight);
68  OPT(constraints::cst_fa_file);
69  OPT(backrub::pivot_residues);
70  OPT(backrub::pivot_atoms);
71  OPT(backrub::min_atoms);
72  OPT(backrub::max_atoms);
73  OPT(backrub::ntrials);
74  OPT(backrub::sc_prob);
75  OPT(backrub::sm_prob);
76  OPT(backrub::sc_prob_uniform);
77  OPT(backrub::sc_prob_withinrot);
78  OPT(backrub::mc_kt);
79  OPT(backrub::mm_bend_weight);
80  OPT(backrub::initial_pack);
81  OPT(backrub::minimize_movemap);
82  OPT(backrub::trajectory);
83  OPT(backrub::trajectory_gz);
84  OPT(backrub::trajectory_stride);
85 
86  // initialize Rosetta
87  devel::init(argc, argv);
88 
89  protocols::viewer::viewer_main( my_main );
90 
91  } catch ( utility::excn::EXCN_Base const & e ) {
92  std::cout << "caught exception " << e.msg() << std::endl;
93  return -1;
94  }
95 
96  return 0;
97 }
98 
99 
100 void *
101 my_main( void* )
102 {
103 
104  protocols::backrub::BackrubProtocolOP backrub_protocol( new protocols::backrub::BackrubProtocol() );
105  protocols::jd2::JobDistributor::get_instance()->go( backrub_protocol );
106 
107  // write parameters for any sets of branching atoms for which there were not optimization coefficients
108  backrub_protocol->write_database();
109  return 0;
110 }
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
int main(int argc, char *argv[])
Definition: backrub.cc:56
Random number generator system.
common derived classes for thrown exceptions
tuple database
Tracer IO system.
basic::options::IntegerOptionKey const nstruct("nstruct")
ocstream cout(std::cout)
Wrapper around std::cout.
Definition: ocstream.hh:287
vector1: std::vector with 1-based indexing
tuple movemap
Definition: loops.py:29
Program options global and initialization function.
#define OPT(akey)
void * my_main(void *)
Definition: backrub.cc:101