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
ConstructorsConstructorDescriptionExpAnnealSchedule(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 TypeMethodDescriptiondoubleGets the starting temperature.doubleGets the final temperature.intGets the number of annealing windows (including repeat windows).doublegetTemperature(int i) Get the temperature for annealing step i.double[]Get all temperatures this schedule specifies.doubleReturns the longest window to be used (normalized to the number of MD steps in a "regular" window).doubleReturns the shortest window to be used (normalized to the number of MD steps in a "regular" window).toString()doubleReturns the sum of window lengths to be used (normalized to the number of MD steps in a "regular" window).doublewindowLength(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:AnnealingScheduleGets the starting temperature.- Specified by:
getHighTempin interfaceAnnealingSchedule- Returns:
- Starting temperature in Kelvin.
-
getLowTemp
public double getLowTemp()Description copied from interface:AnnealingScheduleGets the final temperature.- Specified by:
getLowTempin interfaceAnnealingSchedule- Returns:
- Final temperature in Kelvin.
-
getNumWindows
public int getNumWindows()Description copied from interface:AnnealingScheduleGets the number of annealing windows (including repeat windows).- Specified by:
getNumWindowsin interfaceAnnealingSchedule- Returns:
- Number of annealing windows.
-
getTemperature
public double getTemperature(int i) Description copied from interface:AnnealingScheduleGet the temperature for annealing step i.- Specified by:
getTemperaturein interfaceAnnealingSchedule- Parameters:
i- An annealing step [0-nWindows)- Returns:
- Associated temperature.
-
getTemperatures
public double[] getTemperatures()Description copied from interface:AnnealingScheduleGet all temperatures this schedule specifies.- Specified by:
getTemperaturesin interfaceAnnealingSchedule- Returns:
- An array of temperatures specified.
-
maxWindowLength
public double maxWindowLength()Description copied from interface:AnnealingScheduleReturns the longest window to be used (normalized to the number of MD steps in a "regular" window).- Specified by:
maxWindowLengthin interfaceAnnealingSchedule- Returns:
- Maximum normalized window length.
-
minWindowLength
public double minWindowLength()Description copied from interface:AnnealingScheduleReturns the shortest window to be used (normalized to the number of MD steps in a "regular" window).- Specified by:
minWindowLengthin interfaceAnnealingSchedule- Returns:
- Minimum normalized window length.
-
toString
-
totalWindowLength
public double totalWindowLength()Description copied from interface:AnnealingScheduleReturns the sum of window lengths to be used (normalized to the number of MD steps in a "regular" window).- Specified by:
totalWindowLengthin interfaceAnnealingSchedule- Returns:
- Total normalized window length.
-
windowLength
public double windowLength(int window) Description copied from interface:AnnealingScheduleGet the relative size of a window (normalized to the number of MD steps in a "regular" window).- Specified by:
windowLengthin interfaceAnnealingSchedule- Parameters:
window- Window to check.- Returns:
- Normalized length of the window.
-