Package ffx.algorithms.optimize.anneal
Class FlatEndAnnealSchedule
java.lang.Object
ffx.algorithms.optimize.anneal.FlatEndAnnealSchedule
- All Implemented Interfaces:
AnnealingSchedule
Composite annealing schedule with flat ends (i.e. spends extra time at the low and high
temperatures).
- Since:
- 1.0
- Author:
- Jacob M. Litman, Michael J. Schnieders
-
Constructor Summary
ConstructorsConstructorDescriptionFlatEndAnnealSchedule(AnnealingSchedule middle, double tLow, double tHigh, double lengthBefore, double lengthAfter) Creates a flat-ended annealing schedule based on a provided schedule for the middle, which is flat for some number of steps at the ends. -
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
-
FlatEndAnnealSchedule
public FlatEndAnnealSchedule(AnnealingSchedule middle, double tLow, double tHigh, double lengthBefore, double lengthAfter) Creates a flat-ended annealing schedule based on a provided schedule for the middle, which is flat for some number of steps at the ends.- Parameters:
middle- Annealing schedule to use in the middle.tLow- Low temperature to use at the last window.tHigh- High temperature to use at the first window.lengthBefore- Relative length of the first ("flat") tempering window at the high temperature. 0 disables this end.lengthAfter- Relative length of the last ("flat") tempering window at the low temperature. 0 disables this end.
-
-
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.
-