Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PlaceSurfaceProbe.cc
Go to the documentation of this file.
1 // Project Headers
2 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
3 // vi: set ts=2 sw=2 noet:
4 //
5 // (c) Copyright Rosetta Commons Member Institutions.
6 // (c) This file is part of the Rosetta software suite and is made available under license.
7 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
8 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
9 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
10 
11 /// @file protocols/hotspot_hashing/movers/PlaceSurfaceProbe.cc
12 /// @brief
13 /// @author Alex Ford fordas@uw.edu
14 //
15 
16 #include <basic/Tracer.hh>
17 
18 #include <utility/tag/Tag.hh>
19 #include <utility/exit.hh>
20 
25 #include <core/pose/Pose.hh>
26 #include <core/pose/util.hh>
28 
29 #include <protocols/moves/Mover.hh>
31 
34 #include <protocols/jd2/Job.hh>
35 
37 
41 
43 
46 
47 
48 namespace protocols
49 {
50 namespace hotspot_hashing
51 {
52 namespace movers
53 {
54 
55 static basic::Tracer TR( "protocols.hotspot_hashing.movers.PlaceSurfaceProbe" );
56 
58  protocols::moves::Mover("PlaceSurfaceProbe"),
59  protocols::hotspot_hashing::movers::PlaceProbeMover(),
60  surface_selection_(NULL),
61  search_density_(0),
62  coarse_angle_sampling_(0),
63  coarse_sampling_(0),
64  refinement_distance_(0),
65  refinement_angle_sampling_(0),
66  refinement_sampling_(0),
67  refinement_pattern_(NULL)
68 {
69 
70 }
71 
72 
74  std::string residue_name,
75  core::Real search_density,
76  core::Real coarse_angle_sampling,
77  core::Real coarse_sampling,
78  core::Real refinement_distance,
79  core::Real refinement_angle_sampling,
80  core::Real refinement_sampling,
81  core::conformation::ResidueCOP target_residue,
82  core::pack::task::TaskFactoryOP /*surface_selection*/,
83  core::Size search_partition,
84  core::Size total_search_partition) :
85  protocols::moves::Mover( "PlaceSurfaceProbe" ),
86  protocols::hotspot_hashing::movers::PlaceProbeMover(
87  residue_name,
88  target_residue,
89  search_partition,
90  total_search_partition),
91  search_density_(search_density),
92  coarse_angle_sampling_(coarse_angle_sampling),
93  coarse_sampling_(coarse_sampling),
94  refinement_distance_(refinement_distance),
95  refinement_angle_sampling_(refinement_angle_sampling),
96  refinement_sampling_(refinement_sampling),
97  refinement_pattern_(initialize_refinement_pattern())
98 {
99 }
100 
102 {
103  return new PlaceSurfaceProbe(*this);
104 }
105 
107 {
109 
110  SearchPatternOP surface_pattern(
112  target_pose,
114  search_density_));
115 
116  core::Real expected_course_search_bound = std::sqrt(search_density_);
117  SearchPatternOP residue_sampling_pattern(
123  0, 360,
124  0, 90,
125  0, 360),
127  0,
130  0, 0,
131  -(expected_course_search_bound / 2),
132  expected_course_search_bound / 2,
133  -(expected_course_search_bound / 2),
134  expected_course_search_bound / 2)));
135 
136  core::pose::Pose residue_pose;
137 
138  ResidueOP virtual_bb_residue = core::pose::add_variant_type_to_residue(*target_residue_, "VIRTUAL_BB", target_pose);
139  StubGenerator::placeResidueOnPose(residue_pose, virtual_bb_residue);
140 
141  SearchPatternOP sampled_surface_pattern(
143  target_pose,
144  residue_pose,
145  surface_pattern,
146  residue_sampling_pattern));
147 
148  return sampled_surface_pattern;
149 }
150 
152 {
154 
155  SearchPatternOP surface_pattern(
157  target_pose,
159  search_density_));
160 
161  SearchPatternOP partitioned_surface_pattern(
163 
164  SearchPatternOP residue_sampling_pattern(
169  0, 360,
170  0, 180,
171  0, 360));
172 
173  core::pose::Pose residue_pose;
174 
175  ResidueOP virtual_bb_residue = core::pose::add_variant_type_to_residue(*target_residue_, "VIRTUAL_BB", target_pose);
176  StubGenerator::placeResidueOnPose(residue_pose, virtual_bb_residue);
177 
178  SearchPatternOP sampled_surface_pattern(
180  target_pose,
181  residue_pose,
182  partitioned_surface_pattern,
183  residue_sampling_pattern));
184 
185  return sampled_surface_pattern;
186 }
187 
189 {
190  return refinement_pattern_;
191 }
192 
194 {
195  return new ComposeSearchPatterns(
208  -(coarse_sampling_ / 2),
209  coarse_sampling_ / 2,
210  -(coarse_sampling_ / 2),
211  coarse_sampling_ / 2));
212 }
213 
214 void
217  protocols::filters::Filters_map const & filters_map,
218  protocols::moves::Movers_map const & movers_map,
219  core::pose::Pose const & target_pose)
220 {
222  tag,
223  data,
224  filters_map,
225  movers_map,
226  target_pose
227  );
228 
229  // Surface Spec
230  search_density_ = tag->getOption< core::Real >( "search_density", 1);
232 
233  // Coarse grid spec
234  coarse_angle_sampling_ = tag->getOption< core::Real >( "coarse_angle_sampling");
235  coarse_sampling_ = tag->getOption< core::Real >( "coarse_sampling");
236 
237  refinement_angle_sampling_ = tag->getOption< core::Real >( "refinement_angle_sampling");
238  refinement_sampling_ = tag->getOption< core::Real >( "refinement_sampling");
239  refinement_distance_ = tag->getOption< core::Real >( "refinement_distance");
240 
242 }
243 
246 {
247  return new PlaceSurfaceProbe;
248 }
249 
252 {
253  return "PlaceSurfaceProbe";
254 }
255 
257 {
258  return "PlaceSurfaceProbeMover";
259 }
260 
261 }
262 }
263 }