Package specific_analyses :: Package frame_order :: Module optimisation :: Class Frame_order_minimise_command
[hide private]
[frames] | no frames]

Class Frame_order_minimise_command

source code


Command class for relaxation dispersion optimisation on the slave processor.

Instance Methods [hide private]
 
__init__(self, min_algor=None, min_options=None, func_tol=None, grad_tol=None, max_iterations=None, scaling_matrix=None, constraints=False, sim_index=None, model=None, param_vector=None, full_tensors=None, full_in_ref_frame=None, rdcs=None, rdc_err=None, rdc_weight=None, rdc_vect=None, rdc_const=None, pcs=None, pcs_err=None, pcs_weight=None, atomic_pos=None, temp=None, frq=None, paramag_centre=None, com=None, ave_pos_pivot=None, pivot=None, pivot_opt=None, sobol_max_points=None, sobol_oversample=None, verbosity=None, quad_int=False)
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, min_algor=None, min_options=None, func_tol=None, grad_tol=None, max_iterations=None, scaling_matrix=None, constraints=False, sim_index=None, model=None, param_vector=None, full_tensors=None, full_in_ref_frame=None, rdcs=None, rdc_err=None, rdc_weight=None, rdc_vect=None, rdc_const=None, pcs=None, pcs_err=None, pcs_weight=None, atomic_pos=None, temp=None, frq=None, paramag_centre=None, com=None, ave_pos_pivot=None, pivot=None, pivot_opt=None, sobol_max_points=None, sobol_oversample=None, verbosity=None, quad_int=False)
(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:
  • 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.
  • sim_index (None or int) - The index of the simulation to optimise. This should be None if normal optimisation is desired.
  • model (str) - The name of the Frame Order model.
  • param_vector (numpy float64 array) - The initial parameter values.
  • full_tensors (numpy nx5D, rank-1 float64 array) - An array of the {Axx, Ayy, Axy, Axz, Ayz} values for all full alignment tensors. The format is [Axx1, Ayy1, Axy1, Axz1, Ayz1, Axx2, Ayy2, Axy2, Axz2, Ayz2, ..., Axxn, Ayyn, Axyn, Axzn, Ayzn].
  • full_in_ref_frame (numpy rank-1 array) - An array of flags specifying if the tensor in the reference frame is the full or reduced tensor.
  • rdcs (numpy rank-2 array) - The RDC lists. The first index must correspond to the different alignment media i and the second index to the spin systems j.
  • rdc_err (numpy rank-2 array) - The RDC error lists. The dimensions of this argument are the same as for 'rdcs'.
  • rdc_weight (numpy rank-2 array) - The RDC weight lists. The dimensions of this argument are the same as for 'rdcs'.
  • rdc_vect (numpy rank-2 array) - The unit XH vector lists corresponding to the RDC values. The first index must correspond to the spin systems and the second index to the x, y, z elements.
  • rdc_const (numpy rank-1 array) - The dipolar constants for each RDC. The indices correspond to the spin systems j.
  • pcs (numpy rank-2 array) - The PCS lists. The first index must correspond to the different alignment media i and the second index to the spin systems j.
  • pcs_err (numpy rank-2 array) - The PCS error lists. The dimensions of this argument are the same as for 'pcs'.
  • pcs_weight (numpy rank-2 array) - The PCS weight lists. The dimensions of this argument are the same as for 'pcs'.
  • atomic_pos (numpy rank-3 array) - The atomic positions of all spins for the PCS and PRE data. The first index is the spin systems j and the second is the structure or state c.
  • temp (numpy rank-1 array) - The temperature of each PCS data set.
  • frq (numpy rank-1 array) - The frequency of each PCS data set.
  • paramag_centre (numpy rank-1, 3D array or rank-2, Nx3 array) - The paramagnetic centre position (or positions).
  • com (numpy 3D rank-1 array) - The centre of mass of the system. This is used for defining the rotor model systems.
  • ave_pos_pivot (numpy 3D rank-1 array) - The pivot point to rotate all atoms about to the average domain position. In most cases this will be the centre of mass of the moving domain. This pivot is shifted by the translation vector.
  • pivot (numpy rank-1, 3D array or None) - The pivot point for the ball-and-socket joint motion. This is needed if PCS or PRE values are used.
  • pivot_opt (bool) - A flag which if True will allow the pivot point of the motion to be optimised.
  • sobol_max_points (int) - The maximum number of Sobol' points to use for the numerical PCS integration technique.
  • sobol_oversample (int) - The oversampling factor Ov used for the total number of points N * Ov * 10**M, where N is the maximum number of Sobol' points and M is the number of dimensions or torsion-tilt angles for the system.
  • scaling_matrix (numpy diagonal matrix) - The diagonal, square scaling matrix.
  • quad_int (bool) - A flag which if True will perform high precision numerical integration via the scipy.integrate quad(), dblquad() and tplquad() integration methods rather than the rough quasi-random numerical integration.
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