Optimizers.simulated_annealing module

Description

This module defines the ParaMol.Optimizers.simulated_annealing.SimulatedAnnealing class, which is the ParaMol implementation of the Monte Carlo method.

class ParaMol.Optimizers.simulated_annealing.SimulatedAnnealing(n_iter, p_init, p_final, avg_acceptance_rate)

Bases: object

ParaMol implementation of the Simulated Annealing optimizer.

Parameters
  • n_iter (float) – Number of iterations to perform in total.

  • p_init (float) – Probability of accepting worse solution at the beginning. The initial temperature is given by \(-1/log(p_init)\).

  • p_final – Probability of accepting worse solution at the end. The final temperature is given by \(-1/log(p_{final})\).

  • avg_acceptance_rate (float) – Average acceptance rate to aim to. If at the start of a new MC block the acceptance rate of a given parameter is larger (lower) than prob, the maximum displacement for that parameter is increased (decreased).

run_optimization(f, parameters, constraints=None)

Method that performs optimization using the simulated annealing method.

Notes

Source: #TODO. include source

Parameters
  • f (callable) – Reference of the objective function.

  • parameters (list) – 1D list with the adimensional mathematical parameters that will be used in the optimization.

  • constraints (None) – Should be None. Monte Carlo optimizer cannot handle restraints.

Returns

parameters – 1D list with the updated adimensional mathematical parameters.