Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MPIHPool_ConvergenceCheck.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 // (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 #ifndef INCLUDED_protocols_canonical_sampling_mc_convergence_checks_MPIHPool_ConvergenceCheck_hh
11 #define INCLUDED_protocols_canonical_sampling_mc_convergence_checks_MPIHPool_ConvergenceCheck_hh
12 
17 // AUTO-REMOVED #include <protocols/canonical_sampling/mc_convergence_checks/HPool.hh>
19 #include <core/pose/Pose.hh>
20 
21 
22 // AUTO-REMOVED #include <core/io/silent/SilentFileData.hh>
24 #include <ObjexxFCL/FArray3D.hh>
25 #include <ObjexxFCL/FArray2D.hh>
26 #include <utility/vector1.hh>
27 #include <core/types.hh>
28 
29 #ifdef USEMPI
30 #include <mpi.h>
31 #endif
32 
33 
34 namespace protocols {
35 namespace canonical_sampling {
36 namespace mc_convergence_checks {
37 
38 
39 class MPIHPool_RMSD : public Pool_RMSD {
40 
41 public:
42 
44 
45  MPIHPool_RMSD( std::string const& silent_file, core::Size levels ); //
46 
47  //~MPIHPool_RMSD();
48 
50 
52  core::pose::Pose const& pose,
53  std::string& best_decoy,
54  core::Real& best_rmsd);
55 
56 
57  void set_discovered_out( std::string const& newout );
58 
60 
61  void set_transition_threshold( core::Real threshold );
62 
63  void set_nresidues( core::Size nres );
64 
66 
67  void max_cache_size( core::Size max_cache );
68 
69  void finalize(); //need to put in
70 
71  bool is_in_neighborhood( Address & q_address, Address & ref_address );
72 
74 
75  bool is_new_structure( Address & address,
78 
79  bool is_new_structure( Address & address,
81  core::Real & rmsds );
82 
83  core::Size find_address( Address & query_addr, utility::vector1< Address > & address_database );
84 
85  void
86  print_address( Address & addr );
87 
88 private:
89 
90  void send_receive_and_write_structures( bool winning_rank, core::pose::Pose const& pose );
91 
93 
95 
96 
97  void
98  buf_to_address( Address & addr, int* addr_buf, core::Size index );
99 
100  void
101  address_to_buf( Address & addr, int* addr_buf, core::Size index );
102 
103  bool
104  is_my_structure();
105 
106  core::Size
108 
109  void
110  update_comm( core::Size newsize );
111 
112  void
113  create_comm( int* ranks_to_include, int new_size );
114 
115  void
116  initialize();
117 
118  void
119  resolve_address_and_assign_tag( Address& new_addr, core::Size& new_level_start, std::string& new_candidate_tag );
120 
121  void
123 
124  void
125  assign_tag( std::string const& address_tag, core::Size assigned_id_num, std::string & newtag );
126 
127  void
128  assign_tag( Address& address_tag, core::Size assigned_id_num, std::string & newtag );
129 
130  //void
131  //increment_pool_size( core::Size num_to_add );
132 
133  bool
134  get_next_candidate(); //returns false if there are no more structures to process
135 
136  void
138 
139  void
141 
142  void
144 
145  void
146  prepare_send_new_coords( bool send_coords );
147 
149 
150  void address_to_string( Address & address_buf, core::Size index, std::string & address_tag );
151 
152  void string_to_address( Address & address_buf, core::Size index, std::string & address_tag );
153 
163  core::Size const nlevels_; //number of levels cannot change during the simulation
166 
172 
175 
176 #ifdef USEMPI
177  static MPI_Comm MPI_COMM_POOL;
178 #endif
179 };
180 
181 } //mc_convergence_checks
182 } //moves
183 } //protocols
184 
185 #endif