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 at end_temperature after duration steps. duration will automatically be set to the total number of steps in the simulation. Only the start_temperature and end_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 at min_temperature, rises to max_temperature after heating_period / 2 steps before returning to min_temperature after another heating_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.