Package edu.duke.cs.osprey.ewakstar
Class EWAKStarGradientDescentPfunc
java.lang.Object
edu.duke.cs.osprey.ewakstar.EWAKStarGradientDescentPfunc
- All Implemented Interfaces:
EWAKStarPartitionFunction,EWAKStarPartitionFunction.WithConfTable,EWAKStarPartitionFunction.WithExternalMemory
public class EWAKStarGradientDescentPfunc
extends Object
implements EWAKStarPartitionFunction.WithConfTable, EWAKStarPartitionFunction.WithExternalMemory
This partition function calculator estimates the partition function value
by alternating between two operations:
1. compute lower energy bounds on conformations to refine the pfunc upper bound
and:
2. compute upper energy bounds on conformations to refine the pfunc lower bound
This implementation will always do operation 1 first, then operation 2 to get off
the initial "flat spot" the pfunc surface.
After that, this implementation is an attempt at a gradient-descent type partition
function calculator. At each step, the operation that maximizes the drop in delta
(according to slope sampling heuristics) is chosen.
This implementation should also perform much better whe operation 2 is
not orders of magnitude slower than operation 1 (when e.g. we're reading
energies out of a cache).
-
Nested Class Summary
Nested classes/interfaces inherited from interface edu.duke.cs.osprey.ewakstar.EWAKStarPartitionFunction
EWAKStarPartitionFunction.ConfListener, EWAKStarPartitionFunction.Result, EWAKStarPartitionFunction.Status, EWAKStarPartitionFunction.Values, EWAKStarPartitionFunction.WithConfTable, EWAKStarPartitionFunction.WithExternalMemoryNested classes/interfaces inherited from interface edu.duke.cs.osprey.ewakstar.EWAKStarPartitionFunction.WithConfTable
EWAKStarPartitionFunction.WithConfTable.UnsupportedExceptionNested classes/interfaces inherited from interface edu.duke.cs.osprey.ewakstar.EWAKStarPartitionFunction.WithExternalMemory
EWAKStarPartitionFunction.WithExternalMemory.UnsupportedException -
Field Summary
FieldsFields inherited from interface edu.duke.cs.osprey.ewakstar.EWAKStarPartitionFunction
decimalPrecision -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompute(int maxNumConfs) intintvoidinit(ConfSearch scoreConfs, ConfSearch energyConfs, BigInteger numConfsBeforePruning, double targetEpsilon, double targetEnergy, int highestNumConfs, boolean printPDBs) Initializes the partition function for calculation.voidvoidvoidsetReportProgress(boolean val) voidSets the stability threshold for this PartitionFunction, if supportedvoidsetUseExternalMemory(boolean val, RCs rcs) voidtraceTo(PfuncSurface val) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.duke.cs.osprey.ewakstar.EWAKStarPartitionFunction
compute, makeResult
-
Field Details
-
ecalc
-
-
Constructor Details
-
EWAKStarGradientDescentPfunc
-
-
Method Details
-
setReportProgress
public void setReportProgress(boolean val) - Specified by:
setReportProgressin interfaceEWAKStarPartitionFunction
-
setConfListener
- Specified by:
setConfListenerin interfaceEWAKStarPartitionFunction
-
getStatus
- Specified by:
getStatusin interfaceEWAKStarPartitionFunction
-
getEpMols
- Specified by:
getEpMolsin interfaceEWAKStarPartitionFunction
-
getSConfs
- Specified by:
getSConfsin interfaceEWAKStarPartitionFunction
-
getValues
- Specified by:
getValuesin interfaceEWAKStarPartitionFunction
-
getNumConfsEvaluated
public int getNumConfsEvaluated()- Specified by:
getNumConfsEvaluatedin interfaceEWAKStarPartitionFunction
-
getParallelism
public int getParallelism()- Specified by:
getParallelismin interfaceEWAKStarPartitionFunction
-
setConfTable
- Specified by:
setConfTablein interfaceEWAKStarPartitionFunction.WithConfTable
-
setUseExternalMemory
- Specified by:
setUseExternalMemoryin interfaceEWAKStarPartitionFunction.WithExternalMemory
-
traceTo
-
init
public void init(ConfSearch scoreConfs, ConfSearch energyConfs, BigInteger numConfsBeforePruning, double targetEpsilon, double targetEnergy, int highestNumConfs, boolean printPDBs) Description copied from interface:EWAKStarPartitionFunctionInitializes the partition function for calculation.- Specified by:
initin interfaceEWAKStarPartitionFunction- Parameters:
scoreConfs- The A* tree of conformations to enumerate (which may have been pruned)energyConfs- The A* tree of conformations to enumerate (which may have been pruned)numConfsBeforePruning- The total number of conformations in the conformation space for this search, including any conformations removed by pruned tuples.targetEpsilon- The accuracy with which to estimate the partition function.targetEnergy- The accuracy with which to estimate the partition function.highestNumConfs- The maximum number of conformations allowed for a partition function calculation.printPDBs- Boolean value for printing PDB files
-
setStabilityThreshold
Description copied from interface:EWAKStarPartitionFunctionSets the stability threshold for this PartitionFunction, if supported- Specified by:
setStabilityThresholdin interfaceEWAKStarPartitionFunction- Parameters:
val- If the partition function upper bound value falls below this threshold, the sequence is considered unstable.
-
compute
public void compute(int maxNumConfs) - Specified by:
computein interfaceEWAKStarPartitionFunction
-