Class TorsionSearch

java.lang.Object
ffx.algorithms.optimize.TorsionSearch

public class TorsionSearch extends Object
TorsionSearch class for performing a torsion scan on a molecule in a molecular assembly. It provides options to run a static comparison of each bond on it's own, or run the full exponential number of configurations. Options to run in parallel with multiple workers exists. It is also set up so that multiple workers can run on different molecules if runWorker is not used.
Author:
Matthew J. Speranza, Arron J. Nessler
  • Constructor Summary

    Constructors
    Constructor
    Description
    TorsionSearch(MolecularAssembly molecularAssembly, Molecule molecule, int nTorsionsPerBond, int returnedStates)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    buildWorker(int rank, int worldSize)
    Builds the worker assignments for each rank.
    long
     
    List of energies for each state in order of lowest to highest energy.
    List of hilbert indices for each state in order of lowest to highest energy.
    List of states in order of lowest to highest energy.
    void
    Runs this worker with the indices assigned to it by the buildWorker() method.
    void
    Scanning through nTorsionsPerBond^nTorsionsPerBond (nTorsionsPerBond x nTorsionsPerBond x nTorsionsPerBond x ...) array.
    void
    spinTorsions(long start, long end)
    Similar to above, but with a limited number of hilbert indices to run through with this worker alone.
    void
    staticAnalysis(int numRemove, double eliminationThreshold)
    Static analysis of torsional bonds.

    Methods inherited from class java.lang.Object

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

    • TorsionSearch

      public TorsionSearch(MolecularAssembly molecularAssembly, Molecule molecule, int nTorsionsPerBond, int returnedStates)
  • Method Details

    • spinTorsions

      public void spinTorsions()
      Scanning through nTorsionsPerBond^nTorsionsPerBond (nTorsionsPerBond x nTorsionsPerBond x nTorsionsPerBond x ...) array. Uses a hilbert curve to get to each point in the discrete space with minimal rotations between each state without recursion. Hilbert curve implementation based on OpenMM's c++ implementation. Runs through ALL indices with this worker. Use other methods to run just one workers indices assigned by the buildWorker() method.
    • spinTorsions

      public void spinTorsions(long start, long end)
      Similar to above, but with a limited number of hilbert indices to run through with this worker alone.
    • staticAnalysis

      public void staticAnalysis(int numRemove, double eliminationThreshold)
      Static analysis of torsional bonds. Optionally remove bonds that cause large energy changes outside of a specified threshold. Only one worker should run this method on the same structure.
      Parameters:
      numRemove - Number of bonds to remove if they exceed the threshold.
      eliminationThreshold - Threshold for removing bonds and logging as high energy.
    • buildWorker

      public boolean buildWorker(int rank, int worldSize)
      Builds the worker assignments for each rank. Should be run before spinTorsions.
      Parameters:
      rank -
      worldSize -
      Returns:
      whether the worker was built successfully
    • runWorker

      public void runWorker()
      Runs this worker with the indices assigned to it by the buildWorker() method.
    • getEnergies

      public List<Double> getEnergies()
      List of energies for each state in order of lowest to highest energy.
    • getHilbertIndices

      public List<Long> getHilbertIndices()
      List of hilbert indices for each state in order of lowest to highest energy.
    • getStates

      public List<AssemblyState> getStates()
      List of states in order of lowest to highest energy.
    • getEnd

      public long getEnd()
      Returns:
      the end index of the system