Tasks.adaptive_parametrization module

Description

This module defines the ParaMol.Tasks.adaptive_parametrization.AdaptiveParametrization class, which is a ParaMol task that performs adaptive parametrization.

class ParaMol.Tasks.adaptive_parametrization.AdaptiveParametrization

Bases: ParaMol.Tasks.task.Task

ParaMol adaptive parametrization task.

Variables
  • parameters_generations (List of list of float) – Parameters of every generation.

  • iteration (int) – Adaptive parametrization iteration number.

  • rmsd (float) – Root mean square deviation of the parameters between two successive iterations.

  • old_param (list or np.array) – Array containing parameters of the previous iteration.

  • new_param (list or np.array) – Array containing parameters of the current iteration.

  • sampling_done (List of bool) – List of flags that indicate whether or not, for a given system, sampling was already performed in this iteration.

static _get_parameters_rmsd(old_params, new_params)

Method that computes the RMSD between the old and new set of parameters. :param old_params: List of the old parameters. :type old_params: list :param new_params: List of the new parameters :type new_params: list

Returns

rmsd (float) – Value of the RMSD.

run_task(settings, systems, parameter_space=None, objective_function=None, optimizer=None, interface=None, rmsd_tol=0.0001, max_iter=100, steps_integrator=500, structures_per_iter=1000, wham_reweighing=False, restart=False)

Method that performs self-consistent parametrization until convergence or maximum number of iterations is achieved.

Parameters
  • settings (dict) – Dictionary containing global ParaMol settings.

  • systems (list of ParaMol.System.system.ParaMolSystem) – List containing instances of ParaMol systems.

  • parameter_space (ParaMol.Parameter_space.parameter_space.ParameterSpace) – Instances of ParameterSpace.

  • objective_function (ParaMol.Objective_function.objective_function.ObjectiveFunction) – Instance of the objective function.

  • optimizer (one of the optimizers defined in the subpackage ParaMol.Optimizers) – Instance of the optimizer.

  • interface (ParaMol.Utils.interface.ParaMolInterface) – ParaMol system instance.

  • rmsd_tol (float) – RMSD tolerance used to break the adaptive parametrization loop.

  • max_iter (int) – Maximum number of adaptive parametrization iterations (default is 100).

  • steps_integrator (int) – Number of steps the integrator performs each time it is called.

  • structures_per_iter (int) – How many structure to sample in each adaptive parametrization iteration (default is 1000).

  • wham_reweighting (bool) – Flag that signals whether or not to perform WHAM reweighting at the end of every iteration.

  • restart (bool) – Flag that controls whether or not to perform a restart.

Returns

systems, parameter_space, objective_function, optimizer