VinaLC: Parallel Molecular Docking Program

Biochemical and Biophysical Systems Group
VinaLC version: 1.1.2

mainProcedure.h
Go to the documentation of this file.
1 /*
2  * File: mainProcedure.h
3  * Author: zhang30
4  *
5  * Created on September 20, 2012, 4:21 PM
6  */
7 
8 #ifndef MAINPROCEDURE_H
9 #define MAINPROCEDURE_H
10 
11 #include <string>
12 #include <sstream>
13 
14 #include <boost/program_options.hpp>
15 #include <boost/filesystem/fstream.hpp>
16 #include <boost/filesystem/exception.hpp>
17 #include <boost/filesystem/convenience.hpp> // filesystem::basename
18 #include <boost/thread/thread.hpp> // hardware_concurrency // FIXME rm ?
19 
20 #include "parse_pdbqt.h"
21 #include "parallel_mc.h"
22 #include "file.h"
23 #include "cache.h"
24 #include "non_cache.h"
25 #include "naive_non_cache.h"
26 #include "parse_error.h"
27 #include "everything.h"
28 #include "weighted_terms.h"
29 #include "current_weights.h"
30 #include "quasi_newton.h"
31 
32 //#include "tee.h"
33 #include "coords.h" // add_to_output_container
34 #include "tokenize.h"
35 
36 
37 void doing(int verbosity, const std::string& str, std::stringstream& log);
38 void done(int verbosity, std::stringstream& log);
39 
40 path make_path(const std::string& str);
41 
42 model parse_bundle(const boost::optional<std::string>& rigid_name_opt,
43  const boost::optional<std::string>& flex_name_opt, std::stringstream& ligSS);
44 
45 model parse_bundle(const boost::optional<std::string>& rigid_name_opt,
46  const boost::optional<std::string>& flex_name_opt, const std::vector<std::string>& ligand_names);
47 
48 void main_procedure(model& m, const boost::optional<model>& ref, // m is non-const (FIXME?)
49  std::stringstream& out_name,
50  bool score_only, bool local_only, bool randomize_only, bool no_cache,
51  const grid_dims& gd, int exhaustiveness,
52  const flv& weights,
53  int cpu, int seed, int verbosity, sz num_modes, fl energy_range, std::stringstream& log);
54 
55 struct usage_error : public std::runtime_error {
56 
57  usage_error(const std::string & message) : std::runtime_error(message) {
58  }
59 };
60 
62  bool some;
63  bool all;
64 
65  options_occurrence() : some(false), all(true) {
66  } // convenience
67 
69  some = some || x.some;
70  all = all && x.all;
71  return *this;
72  }
73 };
74 
75 options_occurrence get_occurrence(boost::program_options::variables_map& vm,
76  boost::program_options::options_description& d);
77 
78 void check_occurrence(boost::program_options::variables_map& vm, boost::program_options::options_description& d);
79 
80 std::string default_output(const std::string& input_name);
81 
82 #endif /* MAINPROCEDURE_H */
83