Temperature scheduling¶
- mlip.simulation.temperature_scheduling.get_temperature_schedule(temperature_schedule_config: TemperatureScheduleConfig, num_steps: int) Callable[[int], float] ¶
Get the temperature schedule for the simulation. The schedule is a function that takes as input the current step and returns the temperature at that step.
- Parameters:
temperature_schedule_config – The temperature schedule to use.
num_steps – The total duration of the simulation
- mlip.simulation.temperature_scheduling.constant_schedule(temperature: float) Callable[[int], float] ¶
Returns a constant temperature schedule that returns the same temperature.
- Parameters:
temperature – The temperature in Kelvin.
- mlip.simulation.temperature_scheduling.linear_schedule(start_temperature: float, end_temperature: float, duration: int) Callable[[int], float] ¶
Returns a linear temperature schedule that starts at
start_temperature
and ends atend_temperature
afterduration
steps.duration
will automatically be set to the total number of steps in the simulation. Only thestart_temperature
andend_temperature
need to be set.- Parameters:
start_temperature – The starting temperature in Kelvin.
end_temperature – The ending temperature in Kelvin.
duration – The duration for heating the system.
- mlip.simulation.temperature_scheduling.triangle_schedule(max_temperature: float, min_temperature: float, heating_period: int) Callable[[int], float] ¶
Returns a triangle wave with period
heating_period
that starts atmin_temperature
, rises tomax_temperature
afterheating_period / 2
steps before returning tomin_temperature
after anotherheating_period / 2
steps.- Parameters:
max_temperature – The maximum temperature in Kelvin.
min_temperature – The minimum temperature in Kelvin.
heating_period – The period for heating the system.