Package ffx.numerics.math
Class HilbertCurveTransforms
java.lang.Object
ffx.numerics.math.HilbertCurveTransforms
HilbertCurveTransforms is a class that provides static methods for converting
between Hilbert indices and coordinates. This is used in the torsion scan of
crystals. This implementation is based on the one in OpenMM, which in turn
is based on Rice Universities implementation. GPT4.0 was used to convert
the c++ code to Java. The copyright is in the ForceFieldX code base under
Licenses/openmm-license/hilbert-curve-license.txt.
-
Method Summary
Modifier and TypeMethodDescriptionstatic long[]
hilbertIndexToCoordinates
(int nBonds, int nBitsPerDim, long index) Convert a Hilbert index to coordinates.static void
Main method for testing the Hilbert curve transforms.
-
Method Details
-
hilbertIndexToCoordinates
public static long[] hilbertIndexToCoordinates(int nBonds, int nBitsPerDim, long index) Convert a Hilbert index to coordinates.- Parameters:
nBonds
- Number of bonds.nBitsPerDim
- Number of bits per dimension.index
- Hilbert index.- Returns:
- Coordinates.
-
main
Main method for testing the Hilbert curve transforms.- Parameters:
args
- Command line arguments.
-