Class StructureMetrics

java.lang.Object
ffx.potential.utils.StructureMetrics

public class StructureMetrics extends Object
Structure Metrics contains functionality to calculate characteristics of coordinate systems.

This includes: Gyrate computes the radius of gyration of a molecular system from its atomic coordinates.

Inertia computes the principal moments of inertia for the system, and optionally translates the center of mass to the origin and rotates the principal axes onto the global axes. Reference: Herbert Goldstein, "Classical Mechanics, 2nd Edition", Addison-Wesley, Reading, MA, 1980; see the Euler angle xyz convention in Appendix B

Since:
1.0
Author:
Michael J. Schnieders, Aaron J. Nessler
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double[][]
    momentsOfInertia(double[] xyz, double[] mass, boolean moved, boolean print, boolean pma)
    Compute the moments of inertia.
    static double[][]
    momentsOfInertia(double[] x, double[] y, double[] z, double[] mass, boolean moved, boolean print, boolean pma)
    Compute the moments of inertia
    static double[][]
    momentsOfInertia(Atom[] atoms, boolean moved, boolean print, boolean pma)
    Compute the moments of inertia for all atoms in the supplied array.
    static double
    radiusOfGyration(double[] xyz, double[] mass)
    Compute the average radius of gyration.
    static double
    radiusOfGyration(double[] x, double[] y, double[] z, double[] mass)
    Compute the average radius of gyration.
    static double
    Compute the radius of gyration for all atoms in the supplied array.
    static double[]
    radiusOfGyrationComponents(double[] xyz, double[] mass, boolean pmp)
    Compute the components that make up the radius of gyration about yz-, xz-, xy-planes.
    static double[]
    radiusOfGyrationComponents(double[] x, double[] y, double[] z, double[] mass, boolean pmp)
    Compute the components that make up the radius of gyration tensor about yz-, xz-, xy-planes.
    static double[]
    Compute the radius of gyration for all atoms in the supplied array.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • StructureMetrics

      public StructureMetrics()
  • Method Details

    • radiusOfGyration

      public static double radiusOfGyration(Atom[] atoms)
      Compute the radius of gyration for all atoms in the supplied array.
      Parameters:
      atoms - Atom array.
      Returns:
      The radius of gyration.
    • radiusOfGyration

      public static double radiusOfGyration(double[] x, double[] y, double[] z, double[] mass)
      Compute the average radius of gyration.
      Parameters:
      x - Array of atomic X-coordinates.
      y - Array of atomic X-coordinates.
      z - Array of atomic X-coordinates.
      Returns:
      The radius of gyration.
    • radiusOfGyration

      public static double radiusOfGyration(double[] xyz, double[] mass)
      Compute the average radius of gyration.
      Parameters:
      xyz - Array of atomic coordinates (xyz = [X0, Y0, Z0, X1, Y1, Z1, ...].
      Returns:
      The radius of gyration.
    • radiusOfGyrationComponents

      public static double[] radiusOfGyrationComponents(Atom[] atoms)
      Compute the radius of gyration for all atoms in the supplied array.
      Parameters:
      atoms - Atom array.
      Returns:
      The radius of gyration.
    • radiusOfGyrationComponents

      public static double[] radiusOfGyrationComponents(double[] xyz, double[] mass, boolean pmp)
      Compute the components that make up the radius of gyration about yz-, xz-, xy-planes.
      Parameters:
      xyz - Coordinates for calculation
      Returns:
      radius of gyration along axes
    • radiusOfGyrationComponents

      public static double[] radiusOfGyrationComponents(double[] x, double[] y, double[] z, double[] mass, boolean pmp)
      Compute the components that make up the radius of gyration tensor about yz-, xz-, xy-planes.
      Parameters:
      x - Coordinates for calculation
      y - Coordinates for calculation
      z - Coordinates for calculation
      pmp - Principal moment plane
      Returns:
      radius of gyration about planes (yz, xz, xy).
    • momentsOfInertia

      public static double[][] momentsOfInertia(Atom[] atoms, boolean moved, boolean print, boolean pma)
      Compute the moments of inertia for all atoms in the supplied array.
      Parameters:
      atoms - Atom array.
      moved - Move coordinates
      print - Display values to user
      pma - Use principal moment axes.
      Returns:
      The moments of inertia.
    • momentsOfInertia

      public static double[][] momentsOfInertia(double[] xyz, double[] mass, boolean moved, boolean print, boolean pma)
      Compute the moments of inertia.
      Parameters:
      xyz - Array of atomic coordinates (xyz = [X0, Y0, Z0, X1, Y1, Z1, ...].
      mass - Mass of atoms
      moved - Move from original coordinates to selection
      print - Display values to user
      pma - Use principal moment axes.
      Returns:
      The radius of gyration.
    • momentsOfInertia

      public static double[][] momentsOfInertia(double[] x, double[] y, double[] z, double[] mass, boolean moved, boolean print, boolean pma)
      Compute the moments of inertia
      Parameters:
      x - Array of atomic X-coordinates.
      y - Array of atomic X-coordinates.
      z - Array of atomic X-coordinates.
      mass - mass of atoms
      moved - Move coordinates to principal axes
      print - Print out values to screen
      pma - Report moments of inertia to principal axes.
      Returns:
      The moment of inertia.