Package ffx.potential.utils
Class ConvexHullOps
java.lang.Object
ffx.potential.utils.ConvexHullOps
This ConvexHullOps class uses the QuickHull3D package by John E. Lloyd to construct and operate on
3D convex hulls: the minimal convex polyhedron that contains all points in a set of points. This
is especially useful for max-dist operations, as the most distant points in a set are guaranteed
to be part of the convex polyhedron.
The QuickHull3D package website is at quickhull3d.github.io/quickhull3d/ The algorithm it uses is described in Barber, Dobkin, and Huhdanpaa, "The Quickhull Algorithm for Convex Hulls" (ACM Transactions on Mathematical Software, Vol. 22, No. 4, December 1996), and the code is based on the C package qhull.
- Since:
- 1.0.0
- Author:
- Jacob M. Litman, Michael J. Schnieders
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.github.quickhull3d.QuickHull3D
constructHull
(Atom[] atoms) Constructs a convex hull from a set of atoms.static Atom[]
identifyHullAtoms
(com.github.quickhull3d.QuickHull3D quickHull3D, Atom[] allAtoms) UNTESTED: Identifies atoms forming the convex hull.static double
maxDist
(com.github.quickhull3d.QuickHull3D quickHull3D) Find the maximum pairwise distance between vertex points on a convex hull.static double
Maximum pairwise distance between atoms in an array.
-
Constructor Details
-
ConvexHullOps
public ConvexHullOps()
-
-
Method Details
-
constructHull
Constructs a convex hull from a set of atoms.- Parameters:
atoms
- Atoms to build a convex hull for.- Returns:
- A QuickHull3D implementation of convex hulls.
-
identifyHullAtoms
public static Atom[] identifyHullAtoms(com.github.quickhull3d.QuickHull3D quickHull3D, Atom[] allAtoms) UNTESTED: Identifies atoms forming the convex hull.- Parameters:
quickHull3D
- A QuickHull3D.allAtoms
- Atoms used in building the QuickHull3D.- Returns:
- Atoms forming the convex hull.
-
maxDist
public static double maxDist(com.github.quickhull3d.QuickHull3D quickHull3D) Find the maximum pairwise distance between vertex points on a convex hull.- Parameters:
quickHull3D
- A QuickHull3D object.- Returns:
- Maximum vertex-vertex distance.
-
maxDist
Maximum pairwise distance between atoms in an array. Uses either the convex hull method (more than 10 atoms), or a brute-force loop (10 atoms or fewer).- Parameters:
atoms
- Atoms to check max pairwise distance for.- Returns:
- Max pairwise distance in Angstroms, or 0 (0 or 1 atoms given).
-