Package ffx.algorithms.optimize.anneal
Class ExpAnnealSchedule
java.lang.Object
ffx.algorithms.optimize.anneal.ExpAnnealSchedule
- All Implemented Interfaces:
AnnealingSchedule
Exponential temperature schedule for simulated annealing
- Since:
- 1.0
- Author:
- Jacob M. Litman, Michael J. Schnieders
-
Constructor Summary
ConstructorDescriptionExpAnnealSchedule
(int nWindows, double tLow, double tHigh) Creates an exponential annealing schedule that decays as tHigh*((tLow/tHigh)^(1/(nWindows-1)))^(n-1). -
Method Summary
Modifier and TypeMethodDescriptiondouble
Gets the starting temperature.double
Gets the final temperature.int
Gets the number of annealing windows (including repeat windows).double
getTemperature
(int i) Get the temperature for annealing step i.double[]
Get all temperatures this schedule specifies.double
Returns the longest window to be used (normalized to the number of MD steps in a "regular" window).double
Returns the shortest window to be used (normalized to the number of MD steps in a "regular" window).toString()
double
Returns the sum of window lengths to be used (normalized to the number of MD steps in a "regular" window).double
windowLength
(int window) Get the relative size of a window (normalized to the number of MD steps in a "regular" window).
-
Constructor Details
-
ExpAnnealSchedule
public ExpAnnealSchedule(int nWindows, double tLow, double tHigh) Creates an exponential annealing schedule that decays as tHigh*((tLow/tHigh)^(1/(nWindows-1)))^(n-1). Caution: high values of nWindows could cause numeric instability.- Parameters:
nWindows
- Number of windows.tLow
- Low temperature bound.tHigh
- High temperature bound.
-
-
Method Details
-
getHighTemp
public double getHighTemp()Description copied from interface:AnnealingSchedule
Gets the starting temperature.- Specified by:
getHighTemp
in interfaceAnnealingSchedule
- Returns:
- Starting temperature in Kelvin.
-
getLowTemp
public double getLowTemp()Description copied from interface:AnnealingSchedule
Gets the final temperature.- Specified by:
getLowTemp
in interfaceAnnealingSchedule
- Returns:
- Final temperature in Kelvin.
-
getNumWindows
public int getNumWindows()Description copied from interface:AnnealingSchedule
Gets the number of annealing windows (including repeat windows).- Specified by:
getNumWindows
in interfaceAnnealingSchedule
- Returns:
- Number of annealing windows.
-
getTemperature
public double getTemperature(int i) Description copied from interface:AnnealingSchedule
Get the temperature for annealing step i.- Specified by:
getTemperature
in interfaceAnnealingSchedule
- Parameters:
i
- An annealing step [0-nWindows)- Returns:
- Associated temperature.
-
getTemperatures
public double[] getTemperatures()Description copied from interface:AnnealingSchedule
Get all temperatures this schedule specifies.- Specified by:
getTemperatures
in interfaceAnnealingSchedule
- Returns:
- An array of temperatures specified.
-
maxWindowLength
public double maxWindowLength()Description copied from interface:AnnealingSchedule
Returns the longest window to be used (normalized to the number of MD steps in a "regular" window).- Specified by:
maxWindowLength
in interfaceAnnealingSchedule
- Returns:
- Maximum normalized window length.
-
minWindowLength
public double minWindowLength()Description copied from interface:AnnealingSchedule
Returns the shortest window to be used (normalized to the number of MD steps in a "regular" window).- Specified by:
minWindowLength
in interfaceAnnealingSchedule
- Returns:
- Minimum normalized window length.
-
toString
-
totalWindowLength
public double totalWindowLength()Description copied from interface:AnnealingSchedule
Returns the sum of window lengths to be used (normalized to the number of MD steps in a "regular" window).- Specified by:
totalWindowLength
in interfaceAnnealingSchedule
- Returns:
- Total normalized window length.
-
windowLength
public double windowLength(int window) Description copied from interface:AnnealingSchedule
Get the relative size of a window (normalized to the number of MD steps in a "regular" window).- Specified by:
windowLength
in interfaceAnnealingSchedule
- Parameters:
window
- Window to check.- Returns:
- Normalized length of the window.
-