mailr16507 - /branches/uf_redesign/specific_fns/model_free/main.py


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

Header


Content

Posted by edward on May 29, 2012 - 12:43:
Author: bugman
Date: Tue May 29 12:42:59 2012
New Revision: 16507

URL: http://svn.gna.org/viewcvs/relax?rev=16507&view=rev
Log:
Removed a number of specific API methods from the model-free analysis.

These are now provided by the base class.


Modified:
    branches/uf_redesign/specific_fns/model_free/main.py

Modified: branches/uf_redesign/specific_fns/model_free/main.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/specific_fns/model_free/main.py?rev=16507&r1=16506&r2=16507&view=diff
==============================================================================
--- branches/uf_redesign/specific_fns/model_free/main.py (original)
+++ branches/uf_redesign/specific_fns/model_free/main.py Tue May 29 12:42:59 
2012
@@ -1236,126 +1236,6 @@
             # If the name is not in 'data_cont', add it.
             if not hasattr(data_cont, name):
                 setattr(data_cont, name, init_data)
-
-
-    def xdata_names(self, set='all', error_names=False, sim_names=False):
-        """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.
-
-
-        @keyword set:           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.
-        @type set:              str
-        @keyword error_names:   A flag which if True will add the error 
object names as well.
-        @type error_names:      bool
-        @keyword sim_names:     A flag which if True will add the Monte 
Carlo simulation object
-                                names as well.
-        @type sim_names:        bool
-        @return:                The list of object names.
-        @rtype:                 list of str
-        """
-
-        # Initialise.
-        names = []
-
-        # Generic.
-        if set == 'all' or set == 'generic':
-            names.append('select')
-            names.append('fixed')
-            names.append('proton_type')
-            names.append('heteronuc_type')
-            names.append('attached_proton')
-            names.append('nucleus')
-            names.append('model')
-            names.append('equation')
-            names.append('params')
-            names.append('xh_vect')
-
-        # Parameters.
-        if set == 'all' or set == 'params':
-            names.append('s2')
-            names.append('s2f')
-            names.append('s2s')
-            names.append('local_tm')
-            names.append('te')
-            names.append('tf')
-            names.append('ts')
-            names.append('rex')
-            names.append('r')
-            names.append('csa')
-
-        # Minimisation statistics.
-        if set == 'all' or set == 'min':
-            names.append('chi2')
-            names.append('iter')
-            names.append('f_count')
-            names.append('g_count')
-            names.append('h_count')
-            names.append('warning')
-
-        # Relaxation data.
-        if set == 'all':
-            names = names + relax_data.get_data_names()
-
-        # Parameter errors.
-        if error_names and (set == 'all' or set == 'params'):
-            names.append('s2_err')
-            names.append('s2f_err')
-            names.append('s2s_err')
-            names.append('local_tm_err')
-            names.append('te_err')
-            names.append('tf_err')
-            names.append('ts_err')
-            names.append('rex_err')
-            names.append('r_err')
-            names.append('csa_err')
-
-        # Parameter simulation values.
-        if sim_names and (set == 'all' or set == 'params'):
-            names.append('s2_sim')
-            names.append('s2f_sim')
-            names.append('s2s_sim')
-            names.append('local_tm_sim')
-            names.append('te_sim')
-            names.append('tf_sim')
-            names.append('ts_sim')
-            names.append('rex_sim')
-            names.append('r_sim')
-            names.append('csa_sim')
-
-        # Relaxation data simulation values.
-        if sim_names and set == 'all':
-            names = names + relax_data.get_data_names(sim_names=True)
-
-        # Return the names.
-        return names
 
 
     def data_type(self, param=None):
@@ -2074,23 +1954,6 @@
             elif need_vect and spin.xh_vect == None:
                 warn(RelaxDeselectWarning(spin_id, 'missing structural 
data'))
                 spin.select = False
-
-
-    def return_data_desc(self, name):
-        """Return a description of the spin specific object.
-
-        @param name:    The name of the spin specific object.
-        @type name:     str
-        @return:        The object description, or None.
-        @rtype:         str or None
-        """
-
-        # Spin parameter.
-        if self.SPIN_PARAMS.contains(name):
-            return self.SPIN_PARAMS.get_desc(name)
-
-        # Otherwise try the relaxation data specific objects.
-        return relax_data.return_data_desc(name)
 
 
     return_data_name_doc = ["Model-free data type string matching patterns", 
"""
@@ -2126,24 +1989,6 @@
 
         """]
 
-    def return_data_name(self, param):
-        """Return a unique identifying string for the model-free parameter.
-
-        @param param:   The model-free parameter name.
-        @type param:    str
-        @return:        The unique parameter identifying string.
-        @rtype:         str
-        """
-
-        # Diffusion tensor parameters.
-        diff_obj = diffusion_tensor.return_data_name(param)
-        if diff_obj:
-            return param
-
-        # Spin parameter.
-        if self.SPIN_PARAMS.contains(param):
-            return param
-
 
     set_doc = ["Model-free set details", """
         Setting a parameter value may have no effect depending on which 
model-free model is chosen, for example if S2f values and S2s values are set 
but the run corresponds to model-free model 'm4' then, because these data 
values are not parameters of the model, they will have no effect.




Related Messages


Powered by MHonArc, Updated Tue May 29 13:00:02 2012