Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NormalizedEvaluatedArchive.hh
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 // This file is part of the Rosetta software suite and is made available under license.
5 // The Rosetta software is developed by the contributing members of the Rosetta Commons consortium.
6 // (C) 199x-2009 Rosetta Commons participating institutions and developers.
7 // For more information, see http://www.rosettacommons.org/.
8 
9 /// @file protocols/jd2/MPIWorkPoolJobDistributor.hh
10 /// @brief header for MPIWorkPoolJobDistributor - intended for continuous resamplig jobs that spawn new jobs based on a pool/archive of
11 /// structures
12 /// @author Oliver Lange olange@u.washington.edu
13 
14 #ifndef INCLUDED_protocols_jd2_archive_NormalizedEvaluatedArchive_hh
15 #define INCLUDED_protocols_jd2_archive_NormalizedEvaluatedArchive_hh
16 
17 // Unit headers
21 //#include <protocols/jd2/archive/NormalizedEvaluatedArchive.fwd.hh>
22 // AUTO-REMOVED #include <core/scoring/constraints/ConstraintSet.hh>
23 
24 // Package headers
26 #include <core/pose/Pose.fwd.hh>
27 // AUTO-REMOVED #include <core/scoring/ScoreFunction.hh>
28 
29 // AUTO-REMOVED #include <protocols/evaluation/PoseEvaluator.hh>
30 
31 // Utility headers
32 #include <core/types.hh>
33 #include <utility/pointer/ReferenceCount.hh>
34 #include <utility/exit.hh>
35 
36 // C++ headers
37 #include <string>
38 #include <list>
39 
43 #include <utility/vector1.hh>
44 
45 
46 namespace protocols {
47 namespace jd2 {
48 namespace archive {
49 //class ArchiveManager;
50 
51 
52 
53 ///@brief Tags used to tag messeges sent by MPI functions used to decide whether a slave is requesting a new job id or
54 ///flagging as job as being a bad input
55 
56 ///@details This job distributor is meant for running jobs where the machine you are using has a large number of
57 ///processors, the number of jobs is much greater than the number of processors, or the runtimes of the individual jobs
58 ///could vary greatly. It dedicates the head node (whichever processor gets processor rank #0) to handling job requests
59 ///from the slave nodes (all nonzero ranks). Unlike the MPIWorkPartitionJobDistributor, this JD will not work at all
60 ///without MPI and the implementations of all but the interface functions have been put inside of ifdef directives.
61 ///Generally each function has a master and slave version, and the interface functions call one or the other depending
62 ///on processor rank.
63 
66 public:
67 
68  ///@brief Constructor and Destructor
72 
73  ///@brief Archive specific options
74  static void register_options();
75 
76  void init_from_options();
77 
78  virtual void initialize();
79 
80  ///@brief add decoy to Archive
81  ///@detail evaluate decoy and call add_evaluated_structure
82  virtual bool add_evaluated_structure( core::io::silent::SilentStructOP from_batch, Batch const& );
83 
84  ///@brief overloaded that we can sort the pool after reading
85  virtual bool restore_from_file();
86 
87  ///@brief determine variation of scores (those that are non-zeros in select_weights_ )
88  bool determine_score_variations() const;
89 
90  ///overloaded to save / restore the variance_archive_
91  virtual void save_to_file( std::string suffix = "" );
92 
93  ///@brief recompute all score-values of all decoys and re-order the archive by (new) select_score
94  void rescore();
95 
96  virtual WeightMap const& score_variations() const;
97 
98  virtual core::Real score_variation( std::string const& col ) const;
99 
100 
101 protected:
102 
105  }
106 
107 private:
108  bool is_start_zero_score( std::string const& ) const;
109 
113 
114  //option settings
122  //for these scores we compute the variance as 0...Q3 instead of Q1..Q3
124  ///@brief keep track whether our options have been registered at start up
125  static bool options_registered_;
126 };
127 
128 
129 }//archive
130 }//jd2
131 }//protocols
132 
133 
134 #endif //INCLUDED_protocols_jd2_Archive_HH