Package specific_analyses :: Package relax_fit :: Module api :: Class Relax_fit
[hide private]
[frames] | no frames]

Class Relax_fit

source code


Class containing functions for relaxation curve fitting.

Instance Methods [hide private]
 
__init__(self)
Initialise the class by placing API_common methods into the API.
source code
list of floats
create_mc_data(self, data_id=None)
Create the Monte Carlo peak intensity data.
source code
 
data_init(self, data_cont, sim=False)
Initialise the spin specific data structures.
source code
 
grid_search(self, lower=None, upper=None, inc=None, constraints=True, verbosity=1, sim_index=None)
The exponential curve fitting grid search method.
source code
 
minimise(self, min_algor=None, min_options=None, func_tol=None, grad_tol=None, max_iterations=None, constraints=False, scaling=True, verbosity=0, sim_index=None, lower=None, upper=None, inc=None)
Relaxation curve fitting minimisation method.
source code
 
overfit_deselect(self, data_check=True, verbose=True)
Deselect spins which have insufficient data to support minimisation.
source code
list of float
return_data(self, data_id=None)
Function for returning the peak intensity data structure.
source code
list of float
return_error(self, data_id)
Return the standard deviation data structure.
source code
 
sim_pack_data(self, data_id, sim_data)
Pack the Monte Carlo simulation data.
source code

Inherited from api_base.API_base: back_calc_ri, base_data_loop, bmrb_read, bmrb_write, calculate, constraint_algorithm, data_names, data_type, default_value, deselect, duplicate_data, eliminate, get_param_names, get_param_values, has_errors, is_spin_param, map_bounds, model_desc, model_loop, model_statistics, model_type, molmol_macro, num_instances, pymol_macro, return_conversion_factor, return_data_desc, return_grace_string, return_units, return_value, set_error, set_param_values, set_selected_sim, set_update, sim_init_values, sim_return_chi2, sim_return_param, sim_return_selected, skip_function

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

Static Methods [hide private]

Inherited from api_base.API_base: __new__

Class Variables [hide private]
  instance = Relax_fit()
hash(x)
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Initialise the class by placing API_common methods into the API.

Overrides: object.__init__

create_mc_data(self, data_id=None)

source code 

Create the Monte Carlo peak intensity data.

Parameters:
  • data_id (str) - The spin identification string, as yielded by the base_data_loop() generator method.
Returns: list of floats
The Monte Carlo simulation data.
Overrides: api_base.API_base.create_mc_data

data_init(self, data_cont, sim=False)

source code 

Initialise the spin specific data structures.

Parameters:
  • data_cont (SpinContainer instance) - The spin container.
  • sim (bool) - The Monte Carlo simulation flag, which if true will initialise the simulation data structure.
Overrides: api_base.API_base.data_init

grid_search(self, lower=None, upper=None, inc=None, constraints=True, verbosity=1, sim_index=None)

source code 

The exponential curve fitting grid search method.

Parameters:
  • lower (array of numbers) - The lower bounds of the grid search which must be equal to the number of parameters in the model.
  • upper (array of numbers) - The upper bounds of the grid search which must be equal to the number of parameters in the model.
  • 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.
  • constraints (bool) - If True, constraints are applied during the grid search (eliminating parts of the grid). If False, no constraints are used.
  • verbosity (int) - A flag specifying the amount of information to print. The higher the value, the greater the verbosity.
  • sim_index (int) - The index of the simulation to apply the grid search to. If None, the normal model is optimised.
Overrides: api_base.API_base.grid_search

minimise(self, min_algor=None, min_options=None, func_tol=None, grad_tol=None, max_iterations=None, constraints=False, scaling=True, verbosity=0, sim_index=None, lower=None, upper=None, inc=None)

source code 

Relaxation curve fitting minimisation method.

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.
  • scaling (bool) - If True, diagonal scaling is enabled during optimisation to allow the problem to be better conditioned.
  • verbosity (int) - The amount of information to print. The higher the value, the greater the verbosity.
  • sim_index (None or int) - The index of the simulation to optimise. This should be None if normal optimisation is desired.
  • 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.
Overrides: api_base.API_base.minimise

overfit_deselect(self, data_check=True, verbose=True)

source code 

Deselect spins which have insufficient data to support minimisation.

Parameters:
  • data_check (bool) - A flag to signal if the presence of base data is to be checked for.
  • verbose (bool) - A flag which if True will allow printouts.
Overrides: api_base.API_base.overfit_deselect

return_data(self, data_id=None)

source code 

Function for returning the peak intensity data structure.

Parameters:
  • data_id (str) - The spin identification string, as yielded by the base_data_loop() generator method.
Returns: list of float
The peak intensity data structure.
Overrides: api_base.API_base.return_data

return_error(self, data_id)

source code 

Return the standard deviation data structure.

Parameters:
  • data_id (str) - The spin identification string, as yielded by the base_data_loop() generator method.
Returns: list of float
The standard deviation data structure.
Overrides: api_base.API_base.return_error

sim_pack_data(self, data_id, sim_data)

source code 

Pack the Monte Carlo simulation data.

Parameters:
  • data_id (str) - The spin identification string, as yielded by the base_data_loop() generator method.
  • sim_data (list of float) - The Monte Carlo simulation data.
Overrides: api_base.API_base.sim_pack_data