Package specific_analyses :: Module hybrid :: Class Hybrid
[hide private]
[frames] | no frames]

Class Hybrid

source code

Class containing function specific to hybrid models.

Instance Methods [hide private]
 
_hybridise(self, hybrid=None, pipe_list=None)
Create the hybrid data pipe.
source code
list of str
data_names(self, set='all', scope=None, error_names=False, sim_names=False)
Return a list of nothing.
source code
 
duplicate_data(self, pipe_from=None, pipe_to=None, model_info=None, global_stats=False, verbose=True)
Duplicate the data specific to a single hybrid data pipe.
source code
str
model_desc(self, model_info)
Return a description of the model.
source code
 
model_loop(self)
Dummy generator method - this should be a global model!
source code
 
model_type(self)
Method stating that this is a global model.
source code
tuple of int, int, float
model_statistics(self, model_info=None, spin_id=None, global_stats=None)
Return the k, n, and chi2 model statistics of the hybrid.
source code
int
num_instances(self)
Return the number of instances, which for hybrids is always 1.
source code
bool
skip_function(self, model_info)
Dummy function.
source code
Method Details [hide private]

_hybridise(self, hybrid=None, pipe_list=None)

source code 

Create the hybrid data pipe.

Parameters:
  • hybrid (str) - The name of the new hybrid data pipe.
  • pipe_list (list of str) - The list of data pipes that the hybrid is composed of.

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

source code 

Return a list of nothing.

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 analysis specific parameter names, or to 'min' for minimisation specific object names.
  • scope (str or None) - The scope of the parameter to return. If not set, then all will be returned. If set to 'global' or 'spin', then only the parameters within that scope will be returned.
  • 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.

duplicate_data(self, pipe_from=None, pipe_to=None, model_info=None, global_stats=False, verbose=True)

source code 

Duplicate the data specific to a single hybrid data pipe.

Parameters:
  • pipe_from (str) - The data pipe to copy the data from.
  • pipe_to (str) - The data pipe to copy the data to.
  • model_info (int) - The model information from model_info().
  • global_stats (bool) - The global statistics flag.
  • verbose (bool) - A flag which if True will cause info to be printed out.

model_desc(self, model_info)

source code 

Return a description of the model.

Parameters:
  • model_info (int) - The model information from the model_loop(). This is unused.
Returns: str
The model description.

model_statistics(self, model_info=None, spin_id=None, global_stats=None)

source code 

Return the k, n, and chi2 model statistics of the hybrid.

k - number of parameters. n - number of data points. chi2 - the chi-squared value.

Parameters:
  • model_index (int) - The model index. This is zero for the global models or equal to the global spin index (which covers the molecule, residue, and spin indices). This originates from the model_loop().
  • spin_id (None or str) - The spin identification string. Either this or the instance keyword argument must be supplied.
  • global_stats (None or bool) - A parameter which determines if global or local statistics are returned. If None, then the appropriateness of global or local statistics is automatically determined.
Returns: tuple of int, int, float
The optimisation statistics, in tuple format, of the number of parameters (k), the number of data points (n), and the chi-squared value (chi2).

num_instances(self)

source code 

Return the number of instances, which for hybrids is always 1.

Returns: int
The number of instances.

skip_function(self, model_info)

source code 

Dummy function.

Parameters:
  • model_info (int) - The model index from model_loop().
Returns: bool
True if the data should be skipped, False otherwise.