Package specific_fns :: Package noe :: Module main :: Class Noe_main
[hide private]
[frames] | no frames]

Class Noe_main

source code


Class containing functions for relaxation data.

Instance Methods [hide private]
 
_assign_function(self, spin=None, intensity=None, spectrum_type=None)
Place the peak intensity data into the spin container.
source code
 
_spectrum_type(self, spectrum_type=None, spectrum_id=None)
Set the spectrum type corresponding to the spectrum_id.
source code
 
calculate(self, spin_id=None, verbosity=1, sim_index=None)
Calculate the NOE and its error.
source code
list of str
data_names(self, set='all', error_names=False, sim_names=False)
Return a list of all spin container specific model-free object names.
source code
 
overfit_deselect(self)
Deselect spins which have insufficient data to support calculation.
source code
None
return_units(self, param)
Dummy function which returns None as the stats have no units.
source code
Class Variables [hide private]
  return_data_name_doc = ['NOE calculation data type string matc...
Method Details [hide private]

_assign_function(self, spin=None, intensity=None, spectrum_type=None)

source code 

Place the peak intensity data into the spin container.

The intensity data can be either that of the reference or saturated spectrum.

Parameters:
  • spin (SpinContainer instance) - The spin container.
  • intensity (float) - The intensity value.
  • spectrum_type (str) - The type of spectrum, one of 'ref' or 'sat'.

_spectrum_type(self, spectrum_type=None, spectrum_id=None)

source code 

Set the spectrum type corresponding to the spectrum_id.

Parameters:
  • spectrum_type (str) - The type of NOE spectrum, one of 'ref' or 'sat'.
  • spectrum_id (str) - The spectrum id string.

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

source code 

Calculate the NOE and its error.

The error for each peak is calculated using the formula:

                 ___________________________________________
              \/ {sd(sat)*I(unsat)}^2 + {sd(unsat)*I(sat)}^2
   sd(NOE) = -----------------------------------------------
                                 I(unsat)^2
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) - The MC simulation index (unused).

data_names(self, set='all', error_names=False, sim_names=False)

source code 

Return a list of all spin container specific model-free object names.

Description

The names are as follows:

  • 'model', the model-free model name.
  • 'equation', the model-free equation type.
  • 'params', an array of the model-free parameter names associated with the model.
  • 's2', S2.
  • 's2f', S2f.
  • 's2s', S2s.
  • 'local_tm', local tm.
  • 'te', te.
  • 'tf', tf.
  • 'ts', ts.
  • 'rex', Rex.
  • 'r', bond length.
  • 'csa', CSA value.
  • 'nucleus', the heteronucleus type.
  • 'chi2', chi-squared value.
  • 'iter', iterations.
  • 'f_count', function count.
  • 'g_count', gradient count.
  • 'h_count', hessian count.
  • 'warning', minimisation warning.
Parameters:
  • set (str) - The set of object names to return. This can be set to 'all' for all names, to 'generic' for generic object names, 'params' for model-free parameter names, or to 'min' for minimisation specific object names.
  • 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.

return_units(self, param)

source code 

Dummy function which returns None as the stats have no units.

Parameters:
  • param (str) - The name of the parameter to return the units string for.
Returns: None
Nothing.

Class Variable Details [hide private]

return_data_name_doc

Value:
['NOE calculation data type string matching patterns',
 '''
        _________________________________________
        |                        |              |
        | Data type              | Object name  |
        |________________________|______________|
        |                        |              |
        | Reference intensity    | \'ref\'        |
...