Rosetta
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ligand_dock.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 app/public/ligand_docking/ligand_dock.cc
11 ///
12 /// @brief Ligand docking application
13 /// @author Rocco Moretti (rmoretti@u.washington.edu) Ian Davis (ian.w.davis@gmail.com)
14 
15 // Unit Headers
16 
17 #include <devel/init.hh>
18 #include <protocols/ligand_docking/ligand_dock_impl.hh>
19 
20 // Utility Headers
21 
22 #include <basic/Tracer.hh>
23 
24 #include <basic/options/option.hh>
25 
32 
33 #include <utility/vector1.hh>
35 
36 static THREAD_LOCAL basic::Tracer TR( "ligand_dock.main" );
37 
38 int
39 main( int argc, char * argv [] )
40 {
41  try {
42 
43  using namespace basic::options;
44  using namespace basic::options::OptionKeys;
56 
75 
76  // Parses command line options and inits RNG.
77  // Doesn't seem to hurt to do it again if already done once (?)
78  // Except in unit testing mode, where it wipes out e.g. -database
79  devel::init(argc, argv);
80 
81  // Giving an AtomTreeDiff input file to ligand_dock is uncommon enough that it isn't worth special casing
82  if ( option[ in::file::silent ].active() ) {
83  TR.Warning << "WARNING: Current version of ligand_dock expects regular silent file with -in:file:silent" << std::endl;
84  TR.Warning << " Use -in:file:atom_tree_diff for inputting Atom Tree Diff format files" << std::endl;
85  }
86 
87  // Backward compatability default
88  // If we've haven set any other JD2 output options, use silent.out with Atom Tree Diff format
89  // (Options tested are a hacky repeat of cases in protocols::jd2::JobDistributorFactory::create_job_outputter() )
93  option[ out::file::atom_tree_diff ].value( "silent.out" );
94  }
95 
96  // Backward compatibility options munging.
98  TR.Warning << "WARNING: For backward compatibility, by default ligand_dock will output Atom Tree Diff format files to -out:file:silent" << std::endl;
99  TR.Warning << " To output regular format silent file format, explicitly set -out:file:silent_struct_type" << std::endl;
101  option[ out::file::silent ].deactivate();
102  }
103 
104  // Note: Another difference from the jd1 version of ligand_dock is that the job order for -s/-l isn't randomized
105 
106  return ligand_dock_main();
107 
108  } catch ( utility::excn::EXCN_Base const & e ) {
109  std::cout << "caught exception " << e.msg() << std::endl;
110  return -1;
111  }
112 
113  return 0;
114 }
StringOptionKey const atom_tree_diff
BooleanOptionKey const no_optH
#define THREAD_LOCAL
IntegerOptionKey const extrachi_cutoff
virtual std::string const msg() const
Definition: EXCN_Base.hh:70
BooleanOptionKey const no_output
StringOptionKey const suffix
int main(int argc, char *argv[])
Definition: ligand_dock.cc:39
basic::options::OptionKeys collection
FileVectorOptionKey const s
Definition: SQLPDB.py:309
void init(int argc, char *argv[])
Command line init() version.
Definition: init.cc:23
BooleanOptionKey const pdb
Definition: contacts.py:38
BooleanOptionKey const nooutput
BooleanOptionKey const enzdes_out
FileVectorOptionKey const extra_res_fa
FileVectorOptionKey const unboundrot
common derived classes for thrown exceptions
TracerProxy Warning
Definition: Tracer.hh:262
basic::options::OptionKeys collection
static void add_relevant(const OptionKey &key)
add OptionKey to list of application relevant options
static THREAD_LOCAL basic::Tracer TR("basic.options")
Tracer IO system.
basic::options::OptionKeys collection
basic::options::OptionKeys collection
basic::options::OptionKeys collection
rule< Scanner, options_closure::context_t > options
Definition: Tag.cc:377
PathVectorOptionKey const database
Permanent solution, add the .params to the minirosetta_database of PyRosetta.
utility::options::OptionCollection option
OptionCollection global.
Definition: option.cc:46
BooleanOptionKey const use_database
FileVectorOptionKey const silent
ocstream cout(std::cout)
Wrapper around std::cout.
Definition: ocstream.hh:287
vector1: std::vector with 1-based indexing
Class for handling user debug/warnings/errors. Use instance of this class instead of 'std::cout' for ...
Definition: Tracer.hh:134
RealVectorOptionKey const dock_pert
Definition: docking.py:35
basic::options::OptionKeys collection
BooleanOptionKey const randomize2
Definition: docking.py:34
static THREAD_LOCAL basic::Tracer TR("ligand_dock.main")
Program options global and initialization function.
StringOptionKey const silent_struct_type
BooleanOptionKey const flip_HNQ
IntegerOptionKey const nstruct