mailr9930 - /1.3/specific_fns/api_base.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on November 24, 2009 - 16:48:
Author: bugman
Date: Tue Nov 24 16:48:38 2009
New Revision: 9930

URL: http://svn.gna.org/viewcvs/relax?rev=9930&view=rev
Log:
Added a number of methods to the specific analysis API.

These include:
    deselect()
    get_param_names()
    get_param_values()
    map_bounds()
    model_desc()
    model_type()
    molmol_macro()
    read_columnar_results()
    return_data_desc()
    skip_function()

The API base class should now be complete.


Modified:
    1.3/specific_fns/api_base.py

Modified: 1.3/specific_fns/api_base.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/api_base.py?rev=9930&r1=9929&r2=9930&view=diff
==============================================================================
--- 1.3/specific_fns/api_base.py (original)
+++ 1.3/specific_fns/api_base.py Tue Nov 24 16:48:38 2009
@@ -125,6 +125,19 @@
         raise RelaxImplementError
 
 
+    def deselect(self, model_index, sim_index=None):
+        """Deselect models or simulations.
+
+        @param model_index:     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).
+        @type model_index:      int
+        @keyword sim_index:     The optional Monte Carlo simulation index.  
If None, then models will be deselected, otherwise the given simulation will.
+        @type sim_index:        None or int
+        """
+
+        # Not implemented.
+        raise RelaxImplementError
+
+
     def duplicate_data(self, pipe_from=None, pipe_to=None, model_index=None, 
global_stats=False, verbose=True):
         """Duplicate the data specific to a single model.
 
@@ -146,6 +159,34 @@
 
     def eliminate(self):
         """Dummy method for model elimination."""
+
+
+    def get_param_names(self, model_index=None):
+        """Return a vector of parameter names.
+
+        @keyword model_index:   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).
+        @type model_index:      int
+        @return:                The vector of parameter names.
+        @rtype:                 list of str
+        """
+
+        # Not implemented.
+        raise RelaxImplementError
+
+
+    def get_param_values(self, model_index=None, sim_index=None):
+        """Return a vector of parameter values.
+
+        @keyword model_index:   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).
+        @type model_index:      int
+        @keyword sim_index:     The optional Monte Carlo simulation index.
+        @type sim_index:        int
+        @return:                The vector of parameter values.
+        @rtype:                 list of str
+        """
+
+        # Not implemented.
+        raise RelaxImplementError
 
 
     def grid_search(self, lower=None, upper=None, inc=None, 
constraints=True, verbosity=1, sim_index=None):
@@ -215,6 +256,21 @@
 
         # Return the default of True.
         return True
+
+
+    def map_bounds(self, param, spin_id=None):
+        """Create bounds for the OpenDX mapping function.
+
+        @param param:       The name of the parameter to return the lower 
and upper bounds of.
+        @type param:        str
+        @param spin_id:     The spin identification string.
+        @type spin_id:      None or str
+        @return:            The upper and lower bounds of the parameter.
+        @rtype:             list of float
+        """
+
+        # Not implemented.
+        raise RelaxImplementError
 
 
     def 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):
@@ -250,6 +306,19 @@
         raise RelaxImplementError
 
 
+    def model_desc(self, model_index):
+        """Return a description of the model.
+
+        @param model_index: The model index.  This originates from the 
model_loop().
+        @type model_index:  int
+        @return:            The model description.
+        @rtype:             str
+        """
+
+        # Not implemented.
+        raise RelaxImplementError
+
+
     def model_loop(self):
         """Default generator method for looping over the models.
 
@@ -293,6 +362,38 @@
         raise RelaxImplementError
 
 
+    def model_type(self):
+        """Return the type of the model, either being 'local' or 'global'.
+
+        @return:            The model type, one of 'local' or 'global'.
+        @rtype:             str
+        """
+
+        # Not implemented.
+        raise RelaxImplementError
+
+
+    def molmol_macro(self, param, style=None, colour_start=None, 
colour_end=None, colour_list=None, spin_id=None):
+        """Create and return an array of Molmol macros.
+
+        @param param:           The parameter name.
+        @type param:            str
+        @keyword style:         The Molmol style.
+        @type style:            None or str
+        @keyword colour_start:  The starting colour (must be a MOLMOL or X11 
name).
+        @type colour_start:     str
+        @keyword colour_end:    The ending colour (must be a MOLMOL or X11 
name).
+        @type colour_end:       str
+        @keyword colour_list:   The colour list used, either 'molmol' or 
'x11'.
+        @type colour_list:      str
+        @keyword spin_id:       The spin identification string.
+        @type spin_id:          str
+        """
+
+        # Not implemented.
+        raise RelaxImplementError
+
+
     def num_instances(self):
         """Function for returning the number of instances.
 
@@ -312,6 +413,19 @@
 
     def overfit_deselect(self):
         """Dummy function, nornally for deselecting spins with insufficient 
data for minimisation."""
+
+
+    def read_columnar_results(self, file_data, verbosity=1):
+        """Read the columnar formatted results file.
+
+        @param file_data:   The processed results file data.
+        @type file_data:    list of lists of str
+        @keyword verbosity: The amount of information to print.  The higher 
the value, the greater the verbosity.
+        @type verbosity:    int
+        """
+
+        # Not implemented.
+        raise RelaxImplementError
 
 
     def return_conversion_factor(self, stat_type, spin=None, spin_id=None):
@@ -338,6 +452,21 @@
         """
 
         return spin.relax_data
+
+
+    def return_data_desc(self, name, spin=None):
+        """Return a description of the spin specific object.
+
+        @param name:    The name of the spin specific object.
+        @type name:     str
+        @param spin:    The spin container.
+        @type spin:     SpinContainer instance
+        @return:        The object description, or None.
+        @rtype:         str or None
+        """
+
+        # Not implemented.
+        raise RelaxImplementError
 
 
     # Empty documentation string.
@@ -696,6 +825,19 @@
         return spin.select_sim
 
 
+    def skip_function(self, model_index):
+        """Skip certain data.
+
+        @param model_index:     The model index.  This originates from the 
model_loop().
+        @type model_index:      int
+        @return:                True if the data should be skipped, False 
otherwise.
+        @rtype:                 bool
+        """
+
+        # Not implemented.
+        raise RelaxImplementError
+
+
     def test_grid_ops(self, lower=None, upper=None, inc=None, n=None):
         """Function for testing that the grid search options are reasonable.
 




Related Messages


Powered by MHonArc, Updated Tue Nov 24 17:00:02 2009