18 #include <basic/Tracer.hh>
20 #include <boost/algorithm/string.hpp>
21 #include <boost/lexical_cast.hpp>
23 #include <utility/tag/Tag.hh>
24 #include <utility/exit.hh>
58 namespace hotspot_hashing
63 static basic::Tracer
TR(
"protocols.hotspot_hashing.movers.PlaceProbeMover" );
67 target_residue_(NULL),
68 current_mode_(RunAll),
70 total_search_partition_(1),
71 initialized_pattern_(false),
80 residue_name_(residue_name),
81 target_residue_(target_residue),
82 current_mode_(RunAll),
83 search_partition_(search_partition),
84 total_search_partition_(total_search_partition),
85 initialized_pattern_(false),
98 if( search_index == 0 )
126 std::stringstream sstream;
130 "placeprobe_prerefine_centroid_stub", sstream.str());
139 std::stringstream sstream;
143 "placeprobe_postrefine_centroid_stub", sstream.str());
148 std::stringstream sstream;
152 "placeprobe_postrefine_orient_stub", sstream.str());
156 "placeprobe_residue_name", post_refinement_residue->name());
159 "placeprobe_residue_number", boost::lexical_cast<std::string>(residueindex));
164 using namespace protocols::hotspot_hashing;
173 TR.Debug <<
"Initializing search pattern." << std::endl;
179 TR.Info <<
"Initialized search pattern. Size: " <<
search_points_.size() << std::endl;
185 TR.Error <<
"Current job nstruct_max: " << current_job->nstruct_max() <<
" less than search pattern size: " <<
search_points_.size() << std::endl;
190 TR.Warning <<
"Current job nstruct_max: " << current_job->nstruct_max() <<
" greater than search pattern size: " <<
search_points_.size() <<
" (Search points will be repeated.)" << std::endl;
211 packer->apply(target_pose);
216 TR.Debug <<
"Creating refinement packing task." << std::endl;
227 packmask[target_residue] =
true;
228 task->restrict_to_residues(packmask);
230 task->nonconst_residue_task(target_residue).restrict_to_repacking();
243 if(tag->hasOption(
"residue_name"))
249 utility_exit_with_message(
"residue_name not specified" );
256 if (!(search_partition_ < total_search_partition_ && total_search_partition_ > 0))
258 TR.Error <<
"Invalid search partition specficition. Partition: " <<
search_partition_ <<
" Total partitions: " << total_search_partition_ << std::endl;
260 utility_exit_with_message(
"Invalid search partition specification.");
264 boost::algorithm::to_lower(mode_specification);
266 if(mode_specification ==
"all")
270 else if(mode_specification ==
"one")
276 TR.Error <<
"Invalid mode specification: " << mode_specification << std::endl;
277 utility_exit_with_message(
"Invalid mode specification: " + mode_specification);
291 boost::algorithm::to_lower(name);
297 else if(name ==
"probe")
301 else if(name ==
"full")
307 TR.Error <<
"Invalid output mode specification: " << name << std::endl;
308 utility_exit_with_message(
"Invalid output mode specification: " + name);