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
ConstructorDescriptionFlatEndAnnealSchedule
(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 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
-
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: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.
-