15 #ifndef INCLUDED_protocols_hotspot_hashing_SearchPattern_hh
16 #define INCLUDED_protocols_hotspot_hashing_SearchPattern_hh
18 #include <boost/algorithm/string.hpp>
19 #include <boost/lexical_cast.hpp>
21 #include <utility/vector1.hh>
22 #include <utility/pointer/ReferenceCount.hh>
23 #include <utility/pointer/owning_ptr.hh>
24 #include <utility/exit.hh>
26 #include <numeric/xyzVector.hh>
27 #include <numeric/xyzMatrix.hh>
28 #include <numeric/xyz.functions.hh>
37 namespace hotspot_hashing {
70 return stream << vector.x() <<
"," << vector.y() <<
"," << vector.z();
78 stream.ignore(1,
',');
80 stream.ignore(1,
',');
97 return stream << a <<
";" << b <<
";" <<
c;
104 stream.ignore(1,
';');
106 stream.ignore(1,
';');
119 inline std::istream &
123 stream.ignore(1,
';');
171 for (x = -1; x <= 1; x += 1)
173 for (y = -1; y <= 1; y += 1)
175 for (z = -1; z <= 1; z += 1 )
177 for (
core::Real angle = 0; angle < 360; angle += 180)
180 Matrix rotation = numeric::z_rotation_matrix_degrees(angle);
183 searchpoints.push_back(tp);
231 Matrix rotation = numeric::x_rotation_matrix_degrees(angle);
234 searchpoints.push_back(tp);
246 std::vector< std::string > vectors;
247 boost::split( vectors, lsmstring, boost::is_any_of(
":") );
249 if(vectors.size() != 2){
253 std::vector< std::string > position;
254 std::vector< std::string > direction;
256 boost::split( position, vectors[0], boost::is_any_of(
",") );
257 boost::split( direction, vectors[1], boost::is_any_of(
",") );
259 if(position.size() != 3 || direction.size() != 3){
263 using boost::lexical_cast;
267 lexical_cast<core::Real>(position[0]),
268 lexical_cast<core::Real>(position[1]),
269 lexical_cast<core::Real>(position[2])),
271 lexical_cast<core::Real>(direction[0]),
272 lexical_cast<core::Real>(direction[1]),
273 lexical_cast<core::Real>(direction[2])));
298 x_sampling(x_sampling),
299 y_sampling(y_sampling),
324 searchpoints.push_back(
326 numeric::x_rotation_matrix_degrees(x_sample) * numeric::y_rotation_matrix_degrees(y_sample),
361 polar_rotation_sampling(polar_rotation_sampling),
362 altitude_rotation_sampling(altitude_rotation_sampling),
363 azmiuth_rotation_sampling(azmiuth_rotation_sampling),
395 searchpoints.push_back(
397 numeric::x_rotation_matrix_degrees(azmiuth_sample) * numeric::y_rotation_matrix_degrees(altitude_sample) * numeric::x_rotation_matrix_degrees(polar_sample),
427 x_sampling(x_sampling),
428 y_sampling(y_sampling),
429 z_sampling(z_sampling),
476 searchpoints.push_back(
479 Vector(x_sample, y_sample, z_sample)));
506 runtime_assert(partition < total_partitions)
518 searchpoints.push_back(sourcepoints[i+1]);
536 source_pattern_a(source_pattern_a),
537 source_pattern_b(source_pattern_b)
546 searchpoints.reserve(sourcepoints_a.size() * sourcepoints_b.size());
548 for (
core::Size a = 1; a <= sourcepoints_a.size(); a += 1)
554 searchpoints.push_back(result);
580 searchpoints.reserve(sourcepoints.size());
582 for (
core::Size i = 1; i <= sourcepoints.size(); i++)
584 searchpoints.push_back(
transform(sourcepoints[i]));
609 for (
core::Size i = 1; i <= sourcepoints.size(); i++)
613 searchpoints.insert(searchpoints.end(), newpoints.begin(), newpoints.end());