Rosetta
|
#include <devel/init.hh>
#include <core/conformation/Conformation.hh>
#include <core/pose/Pose.hh>
#include <core/types.hh>
#include <core/import_pose/import_pose.hh>
#include <numeric/xyzVector.hh>
#include <numeric/xyz.functions.hh>
#include <numeric/conversions.hh>
#include <utility/vector1.hh>
#include <basic/Tracer.hh>
#include <numeric/numeric.functions.hh>
#include <numeric/util.hh>
Functions | |
AtomID_Map< bool > | concave_shell (core::pose::Pose &pose, core::Real min_z, core::Real max_z, core::Real incr_z, core::Real shell_radius) |
compute the concave shell from the pose, computes along a slice and takes the atoms within a shell, not just the outermost ones More... | |
utility::vector1< utility::vector1< core::Size > > | convex_hull (std::map< core::Size, core::Vector > coords, core::Real min_z, core::Real max_z) |
computes 2D convex hull: points in a slice on z-dimension are flattened into xy plane; the output is three lists of points for inside, outside and boundary More... | |
utility::vector1< utility::vector1< core::Size > > | concave_hull (std::map< core::Size, core::Vector > coords, utility::vector1< utility::vector1< core::Size > > point_lists, core::Real dist_cutoff=4.0) |
computes 2D concave hull from three lists of points for inside, outside and boundary More... | |
utility::vector1< utility::vector1< core::Size > > | add_shell (std::map< core::Size, core::Vector > coords, utility::vector1< utility::vector1< core::Size > > point_lists, core::Real shell_radius) |
adds a shell to boundary points which are taken from the inside point list More... | |
utility::vector1< core::Real > | get_distances (std::map< core::Size, core::Vector > coords, core::Size p1, core::Size p2, utility::vector1< core::Size > points, bool clock=false) |
compute distances in point list from line p1p2 which points: i,o,b for inside, outside or boundary More... | |
utility::vector1< core::Real > | get_angles (std::map< core::Size, core::Vector > coords, core::Size p1, core::Size p2, utility::vector1< core::Size > points, bool clock=false) |
compute enclosing angles in point list from line p1p2 which points: i,o,b for inside, outside or boundary More... | |
core::Size | find_closest (std::map< core::Size, core::Vector > coords, core::Size p1, core::Size p2, utility::vector1< core::Size > inside_points, bool clock=false) |
find point id that is closest to line connecting p1p2 which points: i,o,b for inside, outside or boundary More... | |
core::Size | find_farthest (std::map< core::Size, core::Vector > coords, core::Size p1, core::Size p2, utility::vector1< core::Size > outside_points, bool clock=false) |
find point id that is farthest from line connecting p1p2 which points: i,o,b for inside, outside or boundary More... | |
std::string | inside_polygon (std::map< core::Size, core::Vector > coords, utility::vector1< core::Size > polygon, core::Vector q) |
checks whether the point q is inside the polygon or not i.e. compute the number of crossing points with polygon 0 outside 1 inside 2 on boundary More... | |
utility::vector1< core::Size > | points_in_triangle (std::map< core::Size, core::Vector > coords, core::Size p1, core::Size p2, core::Size q, utility::vector1< core::Size > points) |
returns the points that are within the triangle between points p1, p2, q More... | |
core::Real | distance_from_line2D (core::Vector p1, core::Vector p2, core::Vector q) |
distance of point q from line between points p1 and p2 More... | |
bool | on_segment (core::Vector p1, core::Vector p2, core::Vector q) |
is point q on line segment between points p1 and p2? More... | |
bool | clockwise (core::Vector p1, core::Vector p2, core::Vector q) |
is q clockwise from p1p2? More... | |
bool | to_left (core::Vector p1, core::Vector p2, core::Vector q) |
check whether q is to the left of p1p2 More... | |
bool | intersect (core::Vector p1, core::Vector p2, core::Vector q) |
check whether line p1p2 intersects with (q to infinity); q is the test point More... | |
core::Real | enclosing_angles (core::Vector p1, core::Vector p2, core::Vector q) |
find the sum of angles p1q and p2q; p1, p2, q are points, not vectors More... | |
int | main (int argc, char *argv[]) |
Main method. More... | |
Variables | |
static basic::Tracer | TR ("apps.pilot.jkleman.mpframework_test2") |
utility::vector1< utility::vector1< core::Size > > add_shell | ( | std::map< core::Size, core::Vector > | coords, |
utility::vector1< utility::vector1< core::Size > > | point_lists, | ||
core::Real | shell_radius | ||
) |
adds a shell to boundary points which are taken from the inside point list
References dist(), utility::vector1< T, A >::has_value(), create_a3b_hbs::i, create_a3b_hbs::j, erraser_util::remove(), and basic::options::OptionKeys::mp::lipid_acc::shell_radius.
Referenced by concave_shell().
bool clockwise | ( | core::Vector | p1, |
core::Vector | p2, | ||
core::Vector | q | ||
) |
is q clockwise from p1p2?
References p2, and enumerate_junctions::q.
Referenced by get_angles(), get_distances(), points_in_triangle(), and to_left().
utility::vector1< utility::vector1< core::Size > > concave_hull | ( | std::map< core::Size, core::Vector > | coords, |
utility::vector1< utility::vector1< core::Size > > | point_lists, | ||
core::Real | dist_cutoff = 4.0 |
||
) |
computes 2D concave hull from three lists of points for inside, outside and boundary
References dist(), dist_cutoff, find_closest(), utility::vector1< T, A >::has_value(), create_a3b_hbs::i, create_a3b_hbs::j, p2, points_in_triangle(), and erraser_util::remove().
Referenced by concave_shell().
AtomID_Map< bool > concave_shell | ( | core::pose::Pose & | pose, |
core::Real | min_z, | ||
core::Real | max_z, | ||
core::Real | incr_z, | ||
core::Real | shell_radius | ||
) |
compute the concave shell from the pose, computes along a slice and takes the atoms within a shell, not just the outermost ones
compute the concave shell from the pose, computes along a slice and takes the atoms within a shell, not just the outermost ones from the concave hull
References a, add_shell(), concave_hull(), convex_hull(), create_a3b_hbs::i, natoms(), beta_nonlocal::pose, create_a3b_hbs::r, kic_runner::shell, and basic::options::OptionKeys::mp::lipid_acc::shell_radius.
Referenced by main().
utility::vector1< utility::vector1< core::Size > > convex_hull | ( | std::map< core::Size, core::Vector > | coords, |
core::Real | min_z, | ||
core::Real | max_z | ||
) |
computes 2D convex hull: points in a slice on z-dimension are flattened into xy plane; the output is three lists of points for inside, outside and boundary
References find_farthest(), utility::vector1< T, A >::has_value(), create_a3b_hbs::i, utility::vector1< T, A >::index(), inside_polygon(), create_a3b_hbs::j, numeric::max(), numeric::min(), p2, points_in_triangle(), erraser_util::remove(), x, predPRE::y, and predPRE::z.
Referenced by concave_shell().
core::Real distance_from_line2D | ( | core::Vector | p1, |
core::Vector | p2, | ||
core::Vector | q | ||
) |
distance of point q from line between points p1 and p2
References ObjexxFCL::abs(), build_jacobian::distance, p2, ObjexxFCL::pow(), and enumerate_junctions::q.
Referenced by get_distances().
core::Real enclosing_angles | ( | core::Vector | p1, |
core::Vector | p2, | ||
core::Vector | q | ||
) |
find the sum of angles p1q and p2q; p1, p2, q are points, not vectors
References a, numeric::angle_of(), compute_difference::b, kmeans_adaptive_kernel_density_bb_dependent_rotlib::c, numeric::conversions::degrees(), p2, and enumerate_junctions::q.
Referenced by get_angles().
core::Size find_closest | ( | std::map< core::Size, core::Vector > | coords, |
core::Size | p1, | ||
core::Size | p2, | ||
utility::vector1< core::Size > | inside_points, | ||
bool | clock = false |
||
) |
find point id that is closest to line connecting p1p2 which points: i,o,b for inside, outside or boundary
find point in AtomIDMap that is closest to line connecting p1p2
References oop_conformations::angles, get_angles(), numeric::min(), and p2.
Referenced by concave_hull().
core::Size find_farthest | ( | std::map< core::Size, core::Vector > | coords, |
core::Size | p1, | ||
core::Size | p2, | ||
utility::vector1< core::Size > | outside_points, | ||
bool | clock = false |
||
) |
find point id that is farthest from line connecting p1p2 which points: i,o,b for inside, outside or boundary
find point in AtomIDMap that is closest to line connecting p1p2
References get_distances(), utility::vector1< T, A >::index(), numeric::max(), and p2.
Referenced by convex_hull().
utility::vector1< core::Real > get_angles | ( | std::map< core::Size, core::Vector > | coords, |
core::Size | p1, | ||
core::Size | p2, | ||
utility::vector1< core::Size > | points, | ||
bool | clock = false |
||
) |
compute enclosing angles in point list from line p1p2 which points: i,o,b for inside, outside or boundary
compute enclosing angles in point list from line p1p2
References oop_conformations::angles, clockwise(), enclosing_angles(), create_a3b_hbs::i, p2, and enumerate_junctions::q.
Referenced by find_closest().
utility::vector1< core::Real > get_distances | ( | std::map< core::Size, core::Vector > | coords, |
core::Size | p1, | ||
core::Size | p2, | ||
utility::vector1< core::Size > | points, | ||
bool | clock = false |
||
) |
compute distances in point list from line p1p2 which points: i,o,b for inside, outside or boundary
compute distances in point list from line p1p2
References clockwise(), distance_from_line2D(), create_a3b_hbs::i, p2, and enumerate_junctions::q.
Referenced by find_farthest().
std::string inside_polygon | ( | std::map< core::Size, core::Vector > | coords, |
utility::vector1< core::Size > | polygon, | ||
core::Vector | q | ||
) |
checks whether the point q is inside the polygon or not i.e. compute the number of crossing points with polygon 0 outside 1 inside 2 on boundary
References create_a3b_hbs::i, intersect(), on_segment(), p2, subloop_histogram::polygon, and enumerate_junctions::q.
Referenced by convex_hull(), and points_in_triangle().
bool intersect | ( | core::Vector | p1, |
core::Vector | p2, | ||
core::Vector | q | ||
) |
check whether line p1p2 intersects with (q to infinity); q is the test point
References max(), min(), p2, enumerate_junctions::q, and to_left().
Referenced by inside_polygon().
int main | ( | int | argc, |
char * | argv[] | ||
) |
bool on_segment | ( | core::Vector | p1, |
core::Vector | p2, | ||
core::Vector | q | ||
) |
is point q on line segment between points p1 and p2?
References max(), min(), p2, and enumerate_junctions::q.
Referenced by inside_polygon().
utility::vector1< core::Size > points_in_triangle | ( | std::map< core::Size, core::Vector > | coords, |
core::Size | p1, | ||
core::Size | p2, | ||
core::Size | q, | ||
utility::vector1< core::Size > | points | ||
) |
returns the points that are within the triangle between points p1, p2, q
References clockwise(), create_a3b_hbs::i, inside_polygon(), p2, enumerate_junctions::q, and numeric::kinematic_closure::triangle().
Referenced by concave_hull(), and convex_hull().
bool to_left | ( | core::Vector | p1, |
core::Vector | p2, | ||
core::Vector | q | ||
) |
check whether q is to the left of p1p2
References clockwise(), p2, and enumerate_junctions::q.
Referenced by intersect().
|
static |