Class HilbertCurveTransforms

java.lang.Object
ffx.numerics.math.HilbertCurveTransforms

public class HilbertCurveTransforms extends Object
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 Details Link icon

    • hilbertIndexToCoordinates Link icon

      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 Link icon

      public static void main(String[] args)
      Main method for testing the Hilbert curve transforms.
      Parameters:
      args - Command line arguments.