Package ffx.algorithms.optimize
Class TorsionSearch
java.lang.Object
ffx.algorithms.optimize.TorsionSearch
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
ConstructorDescriptionTorsionSearch
(MolecularAssembly molecularAssembly, Molecule molecule, int nTorsionsPerBond, int returnedStates) -
Method Summary
Modifier and TypeMethodDescriptionboolean
buildWorker
(int rank, int worldSize) Builds the worker assignments for each rank.long
getEnd()
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 ...)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.
-
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
List of energies for each state in order of lowest to highest energy. -
getHilbertIndices
List of hilbert indices for each state in order of lowest to highest energy. -
getStates
List of states in order of lowest to highest energy. -
getEnd
public long getEnd()- Returns:
- the end index of the system
-