Class CalcPoint


  • public class CalcPoint
    extends Object
    Utility operations on Point3d.
    Since:
    5.0.0
    Author:
    Aleix Lafita
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void center​(javax.vecmath.Point3d[] x)
      Center a cloud of points.
      static javax.vecmath.Point3d centroid​(javax.vecmath.Point3d[] x)
      Calculate the centroid of the point cloud.
      static javax.vecmath.Point3d[] clonePoint3dArray​(javax.vecmath.Point3d[] x)
      Clone an array of points.
      static int contacts​(javax.vecmath.Point3d[] x, javax.vecmath.Point3d[] y, double maxDistance)  
      static Matrix formMatrix​(javax.vecmath.Point3d[] a, javax.vecmath.Point3d[] b)  
      static double GTSlikeScore​(javax.vecmath.Point3d[] x, javax.vecmath.Point3d[] y)  
      static double rmsd​(javax.vecmath.Point3d[] x, javax.vecmath.Point3d[] y)
      Calculate the RMSD of two point arrays, already superposed.
      static double rmsdMin​(javax.vecmath.Point3d[] x, javax.vecmath.Point3d[] y)  
      static double TMScore​(javax.vecmath.Point3d[] x, javax.vecmath.Point3d[] y, int lengthNative)
      Returns the TM-Score for two superimposed sets of coordinates Yang Zhang and Jeffrey Skolnick, PROTEINS: Structure, Function, and Bioinformatics 57:702–710 (2004)
      static void transform​(javax.vecmath.Matrix4d rotTrans, javax.vecmath.Point3d[] x)
      Transform all points with a 4x4 transformation matrix.
      static void translate​(javax.vecmath.Vector3d trans, javax.vecmath.Point3d[] x)
      Translate all points with a translation vector.
    • Method Detail

      • center

        public static void center​(javax.vecmath.Point3d[] x)
        Center a cloud of points. This means subtracting the of the cloud to each point.
        Parameters:
        x - array of points. Point objects will be modified
      • centroid

        public static javax.vecmath.Point3d centroid​(javax.vecmath.Point3d[] x)
        Calculate the centroid of the point cloud.
        Parameters:
        x - array of points. Point objects will not be modified
        Returns:
        centroid as Point3d
      • transform

        public static void transform​(javax.vecmath.Matrix4d rotTrans,
                                     javax.vecmath.Point3d[] x)
        Transform all points with a 4x4 transformation matrix.
        Parameters:
        rotTrans - 4x4 transformation matrix
        x - array of points. Point objects will be modified
      • translate

        public static void translate​(javax.vecmath.Vector3d trans,
                                     javax.vecmath.Point3d[] x)
        Translate all points with a translation vector.
        Parameters:
        trans - the translation vector to apply
        x - array of points. Point objects will be modified
      • clonePoint3dArray

        public static javax.vecmath.Point3d[] clonePoint3dArray​(javax.vecmath.Point3d[] x)
        Clone an array of points.
        Parameters:
        x - original array of points. Point objects will not be modified
        Returns:
        new array of points, identical clone of x
      • formMatrix

        public static Matrix formMatrix​(javax.vecmath.Point3d[] a,
                                        javax.vecmath.Point3d[] b)
      • TMScore

        public static double TMScore​(javax.vecmath.Point3d[] x,
                                     javax.vecmath.Point3d[] y,
                                     int lengthNative)
        Returns the TM-Score for two superimposed sets of coordinates Yang Zhang and Jeffrey Skolnick, PROTEINS: Structure, Function, and Bioinformatics 57:702–710 (2004)
        Parameters:
        x - coordinate set 1
        y - coordinate set 2
        lengthNative - total length of native sequence
        Returns:
      • GTSlikeScore

        public static double GTSlikeScore​(javax.vecmath.Point3d[] x,
                                          javax.vecmath.Point3d[] y)
      • rmsd

        public static double rmsd​(javax.vecmath.Point3d[] x,
                                  javax.vecmath.Point3d[] y)
        Calculate the RMSD of two point arrays, already superposed.
        Parameters:
        x - array of points superposed to y
        y - array of points superposed to x
        Returns:
        RMSD
      • rmsdMin

        public static double rmsdMin​(javax.vecmath.Point3d[] x,
                                     javax.vecmath.Point3d[] y)
      • contacts

        public static int contacts​(javax.vecmath.Point3d[] x,
                                   javax.vecmath.Point3d[] y,
                                   double maxDistance)