Package specific_analyses :: Package relax_disp :: Module optimisation :: Class Disp_minimise_command
[hide private]
[frames] | no frames]

Class Disp_minimise_command

source code


Command class for relaxation dispersion optimisation on the slave processor.

Instance Methods [hide private]
 
__init__(self, spins=None, spin_ids=None, sim_index=None, scaling_matrix=None, min_algor=None, min_options=None, func_tol=None, grad_tol=None, max_iterations=None, constraints=False, verbosity=0, lower=None, upper=None, inc=None, fields=None, param_names=None)
Initialise the base class, storing all the master data to be sent to the slave processor.
source code
 
run(self, processor, completed)
Set up and perform the optimisation.
source code

Inherited from multi.slave_commands.Slave_command: set_memo_id

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, spins=None, spin_ids=None, sim_index=None, scaling_matrix=None, min_algor=None, min_options=None, func_tol=None, grad_tol=None, max_iterations=None, constraints=False, verbosity=0, lower=None, upper=None, inc=None, fields=None, param_names=None)
(Constructor)

source code 

Initialise the base class, storing all the master data to be sent to the slave processor.

This method is run on the master processor whereas the run() method is run on the slave processor.

Parameters:
  • spins (list of SpinContainer instances) - The list of spin data container for the cluster. If this argument is supplied, then the spin_id argument will be ignored.
  • spin_ids (list of str) - The list of spin ID strings corresponding to the spins argument.
  • sim_index (None or int) - The index of the simulation to optimise. This should be None if normal optimisation is desired.
  • scaling_matrix (numpy diagonal matrix) - The diagonal, square scaling matrix.
  • min_algor (str) - The minimisation algorithm to use.
  • min_options (array of str) - An array of options to be used by the minimisation algorithm.
  • func_tol (None or float) - The function tolerance which, when reached, terminates optimisation. Setting this to None turns of the check.
  • grad_tol (None or float) - The gradient tolerance which, when reached, terminates optimisation. Setting this to None turns of the check.
  • max_iterations (int) - The maximum number of iterations for the algorithm.
  • constraints (bool) - If True, constraints are used during optimisation.
  • verbosity (int) - The amount of information to print. The higher the value, the greater the verbosity.
  • lower (array of numbers) - The lower bounds of the grid search which must be equal to the number of parameters in the model. This optional argument is only used when doing a grid search.
  • upper (array of numbers) - The upper bounds of the grid search which must be equal to the number of parameters in the model. This optional argument is only used when doing a grid search.
  • inc (array of int) - The increments for each dimension of the space for the grid search. The number of elements in the array must equal to the number of parameters in the model. This argument is only used when doing a grid search.
  • fields (int) - The list of unique of spectrometer field strengths.
  • param_names (str) - The list of parameter names to use in printouts.
Overrides: object.__init__

run(self, processor, completed)

source code 

Set up and perform the optimisation.

Parameters:
  • processor - The slave processor the command is running on. Results from the command are returned via calls to processor.return_object.
  • completed - The flag used in batching result returns to indicate that the sequence of batched result commands has completed. This value should be returned via the last result object retuned by this method or methods it calls. All other Result_commands should be initialised with completed=False. This is an optimisation to prevent the sending an extra batched result queue completion result command being sent, it may be an over early optimisation.
Overrides: multi.slave_commands.Slave_command.run