Package specific_fns :: Module consistency_tests :: Class Consistency_tests
[hide private]
[frames] | no frames]

Class Consistency_tests

source code


Class containing functions specific to consistency testing.

Instance Methods [hide private]
 
__init__(self)
Initialise the class by placing API_common methods into the API.
source code
 
_set_frq(self, frq=None)
Function for selecting which relaxation data to use in the consistency tests.
source code
 
calculate(self, spin_id=None, verbosity=1, sim_index=None)
Calculation of the consistency functions.
source code
 
data_init(self, data_cont, sim=False)
Initialise the data structures.
source code
list of str
data_names(self, set=None, error_names=False, sim_names=False)
Return a list of all spin container specific consistency testing object names.
source code
 
overfit_deselect(self)
Deselect spins which have insufficient data to support calculation.
source code
 
set_error(self, model_info, index, error)
Set the parameter errors.
source code
list of float
sim_return_param(self, model_info, index)
Return the array of simulation parameter values.
source code
list of int
sim_return_selected(self, model_info)
Return the array of selected simulation flags.
source code

Inherited from api_base.API_base: back_calc_ri, base_data_loop, bmrb_read, bmrb_write, create_mc_data, data_type, default_value, deselect, duplicate_data, eliminate, get_param_names, get_param_values, grid_search, has_errors, is_spin_param, map_bounds, minimise, model_desc, model_loop, model_statistics, model_type, molmol_macro, num_instances, pymol_macro, read_columnar_results, return_conversion_factor, return_data, return_data_desc, return_data_name, return_error, return_grace_string, return_units, return_value, set_param_values, set_selected_sim, set_update, sim_init_values, sim_pack_data, sim_return_chi2, skip_function, test_grid_ops

Class Variables [hide private]
  default_value_doc = '\n Consistency testing default val...
  return_data_name_doc = '\n Consistency testing data typ...
  set_doc = '\n Consistency testing set details\n ...

Inherited from api_base.API_base: GLOBAL_PARAMS, SPIN_PARAMS, eliminate_doc

Method Details [hide private]

calculate(self, spin_id=None, verbosity=1, sim_index=None)

source code 

Calculation of the consistency functions.

Parameters:
  • spin_id (None or str) - The spin identification string.
  • verbosity (int) - The amount of information to print. The higher the value, the greater the verbosity.
  • sim_index (None or int) - The optional MC simulation index.
Overrides: api_base.API_base.calculate

data_init(self, data_cont, sim=False)

source code 

Initialise the data structures.

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

data_names(self, set=None, error_names=False, sim_names=False)

source code 

Return a list of all spin container specific consistency testing object names.

Description

The names are as follows:

  • 'r', bond length.
  • 'csa', CSA value.
  • 'heteronuc_type', the heteronucleus type.
  • 'orientation', angle between the 15N-1H vector and the principal axis of the 15N chemical shift tensor.
  • 'tc', correlation time.
  • 'j0', spectral density value at 0 MHz (from Farrow et al. (1995) JBNMR, 6: 153-162).
  • 'f_eta', eta-test (from Fushman et al. (1998) JACS, 120: 10947-10952).
  • 'f_r2', R2-test (from Fushman et al. (1998) JACS, 120: 10947-10952).
Parameters:
  • set (ignored) - An unused variable.
  • error_names (bool) - A flag which if True will add the error object names as well.
  • sim_names (bool) - A flag which if True will add the Monte Carlo simulation object names as well.
Returns: list of str
The list of object names.
Overrides: api_base.API_base.data_names

overfit_deselect(self)

source code 

Deselect spins which have insufficient data to support calculation.

Overrides: api_base.API_base.overfit_deselect

set_error(self, model_info, index, error)

source code 

Set the parameter errors.

Parameters:
  • model_info (SpinContainer instance) - The spin container originating from model_loop().
  • index (int) - The index of the parameter to set the errors for.
  • error (float) - The error value.
Overrides: api_base.API_base.set_error

sim_return_param(self, model_info, index)

source code 

Return the array of simulation parameter values.

Parameters:
  • model_info (SpinContainer instance) - The spin container originating from model_loop().
  • index (int) - The index of the parameter to return the array of values for.
Returns: list of float
The array of simulation parameter values.
Overrides: api_base.API_base.sim_return_param

sim_return_selected(self, model_info)

source code 

Return the array of selected simulation flags.

Parameters:
  • model_info (SpinContainer instance) - The spin container originating from model_loop().
Returns: list of int
The array of selected simulation flags.
Overrides: api_base.API_base.sim_return_selected

Class Variable Details [hide private]

default_value_doc

Value:
'''
        Consistency testing default values
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        These default values are found in the file \'physical_constant\
s.py\'.

         _____________________________________________________________\
_________________________
...

return_data_name_doc

Value:
'''
        Consistency testing data type string matching patterns
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

         ___________________________________________
        |                       |                  |
        | Data type             | Object name      |
        |_______________________|__________________|
...

set_doc

Value:
'''
        Consistency testing set details
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        In consistency testing, only four values can be set, the bond \
length, CSA, angle
        Theta (\'orientation\') and correlation time values. These mus\
t be set prior to the
...