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 /// @details
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>
51 
52 void *
53 my_main( void* );
54 
55 int
56 main( int argc, char * argv [] )
57 {
58  try {
59 
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 }
IntegerOptionKey const ntrials("backrub:ntrials")
virtual std::string const msg() const
Definition: EXCN_Base.hh:70
IntegerOptionKey const trajectory_stride("backrub:trajectory_stride")
basic::options::OptionKeys collection
RealOptionKey const sc_prob_withinrot("backrub:sc_prob_withinrot")
void init(int argc, char *argv[])
Command line init() version.
Definition: init.cc:23
RealOptionKey const mc_kt("backrub:mc_kt")
BooleanOptionKey const ignore_unrecognized_res("in:ignore_unrecognized_res")
StringVectorOptionKey const pivot_atoms("backrub:pivot_atoms")
BooleanOptionKey const trajectory("backrub:trajectory")
FileVectorOptionKey const l("in:file:l")
int main(int argc, char *argv[])
Definition: backrub.cc:56
IntegerOptionKey const max_atoms("backrub:max_atoms")
Random number generator system.
common derived classes for thrown exceptions
basic::options::OptionKeys collection
BooleanOptionKey const initial_pack("backrub:initial_pack")
FileOptionKey const movemap("in:file:movemap")
basic::options::OptionKeys collection
RealOptionKey const sc_prob_uniform("backrub:sc_prob_uniform")
FileVectorOptionKey const resfile("packing:resfile")
IntegerOptionKey const min_atoms("backrub:min_atoms")
macros to define options on a per-application basis at the top of app files (those with main) ...
Tracer IO system.
FileOptionKey const minimize_movemap("backrub:minimize_movemap")
basic::options::OptionKeys collection
StringVectorOptionKey const cst_fa_file("constraints:cst_fa_file")
RealOptionKey const sc_prob("backrub:sc_prob")
ocstream cout(std::cout)
Wrapper around std::cout.
Definition: ocstream.hh:287
vector1: std::vector with 1-based indexing
BooleanOptionKey const trajectory_gz("backrub:trajectory_gz")
basic::options::OptionKeys collection
PathVectorOptionKey const database("in:path:database")
Program options global and initialization function.
#define OPT(akey)
IntegerVectorOptionKey const pivot_residues("backrub:pivot_residues")
RealOptionKey const cst_fa_weight("constraints:cst_fa_weight")
RealOptionKey const mm_bend_weight("backrub:mm_bend_weight")
void * my_main(void *)
Definition: backrub.cc:101
FileVectorOptionKey const s("in:file:s")
RealOptionKey const sm_prob("backrub:sm_prob")
IntegerOptionKey const nstruct("out:nstruct")