basinhopping

despasito.parameter_fitting.global_methods.basinhopping

basinhopping(parameters_guess, bounds, fit_bead, fit_parameter_names, exp_dict, global_opts={}, minimizer_opts={})[source]

Fit defined parameters for equation of state object using scipy.optimize.basinhopping with given experimental data.

Parameters:
  • parameters_guess (numpy.ndarray) – An array of initial guesses for parameters.

  • bounds (list[tuple]) – List of length equal to fit_parameter_names with lists of pairs for minimum and maximum bounds of parameter being fit. Defaults from Eos object are broad, so we recommend specification.

  • fit_bead (str) – Name of bead whose parameters are being fit.

  • fit_parameter_names (list[str]) – This list contains the name of the parameter being fit (e.g. epsilon). See EOS documentation for supported parameter names. Cross interaction parameter names should be composed of parameter name and the other bead type, separated by an underscore (e.g. epsilon_CO2).

  • exp_dict (dict) – Dictionary of experimental data objects.

  • global_opts (dict, Optional, default={}) –

    • niter (int) - Optional, default=10, The number of basin-hopping iterations

    • T (float) - Optional, default=0.5, The “temperature” parameter for the accept

    or reject criterion. For best results T should be comparable to the separation (in function value) between local minima. - niter_success (int) Optional, default=3, Stop the run if the global minimum candidate remains the same for this number of iterations. - stepsize (float) - Optional, default=0.1, Maximum step size for use in the random displacement. - take_step (callable) - Set with custom BasinStep class - write_intermediate_file (str) - Optional, default=False, If True, an intermediate file will be written from the method callback - filename (str) - Optional, default=None, filename for callback output, if provided, write_intermediate_file will be set to True - obj_cut (float) - Optional, default=None, Cut-off objective value to write the parameters, if provided, write_intermediate_file will be set to True - etc. Other keywords for scipy.optimize.basinhopping use the function defaults

  • minimizer_opts (dict, Optional, default={}) – Dictionary used to define minimization type and the associated options.

    • method (str) - Method available to scipy.optimize.minimize

    • options (dict) - This dictionary contains the kwargs available to the chosen

    method

Returns:

Objective – scipy OptimizedResult object

Return type:

obj