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.WithExternalMemory
Nested classes/interfaces inherited from interface edu.duke.cs.osprey.ewakstar.EWAKStarPartitionFunction.WithConfTable
EWAKStarPartitionFunction.WithConfTable.UnsupportedException
Nested 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 TypeMethodDescriptionvoid
compute
(int maxNumConfs) int
int
void
init
(ConfSearch scoreConfs, ConfSearch energyConfs, BigInteger numConfsBeforePruning, double targetEpsilon, double targetEnergy, int highestNumConfs, boolean printPDBs) Initializes the partition function for calculation.void
void
void
setReportProgress
(boolean val) void
Sets the stability threshold for this PartitionFunction, if supportedvoid
setUseExternalMemory
(boolean val, RCs rcs) void
traceTo
(PfuncSurface val) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
setReportProgress
in interfaceEWAKStarPartitionFunction
-
setConfListener
- Specified by:
setConfListener
in interfaceEWAKStarPartitionFunction
-
getStatus
- Specified by:
getStatus
in interfaceEWAKStarPartitionFunction
-
getEpMols
- Specified by:
getEpMols
in interfaceEWAKStarPartitionFunction
-
getSConfs
- Specified by:
getSConfs
in interfaceEWAKStarPartitionFunction
-
getValues
- Specified by:
getValues
in interfaceEWAKStarPartitionFunction
-
getNumConfsEvaluated
public int getNumConfsEvaluated()- Specified by:
getNumConfsEvaluated
in interfaceEWAKStarPartitionFunction
-
getParallelism
public int getParallelism()- Specified by:
getParallelism
in interfaceEWAKStarPartitionFunction
-
setConfTable
- Specified by:
setConfTable
in interfaceEWAKStarPartitionFunction.WithConfTable
-
setUseExternalMemory
- Specified by:
setUseExternalMemory
in 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:EWAKStarPartitionFunction
Initializes the partition function for calculation.- Specified by:
init
in 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:EWAKStarPartitionFunction
Sets the stability threshold for this PartitionFunction, if supported- Specified by:
setStabilityThreshold
in 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:
compute
in interfaceEWAKStarPartitionFunction
-