mailr4861 - in /branches/N_state_model: generic_fns/value.py specific_fns/n_state_model.py


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

Header


Content

Posted by edward on January 21, 2008 - 11:22:
Author: bugman
Date: Mon Jan 21 11:22:37 2008
New Revision: 4861

URL: http://svn.gna.org/viewcvs/relax?rev=4861&view=rev
Log:
Started to write the set_non_spin_params() method.  It doesn't do anything 
yet though.


Modified:
    branches/N_state_model/generic_fns/value.py
    branches/N_state_model/specific_fns/n_state_model.py

Modified: branches/N_state_model/generic_fns/value.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/generic_fns/value.py?rev=4861&r1=4860&r2=4861&view=diff
==============================================================================
--- branches/N_state_model/generic_fns/value.py (original)
+++ branches/N_state_model/generic_fns/value.py Mon Jan 21 11:22:37 2008
@@ -198,6 +198,9 @@
                 for j in xrange(len(val)):
                     set_spin_params(value=val[j], error=None, spin=spin, 
param=None)
 
+        # Set param to a list of None the length of val.
+        param = [None] * len(val)
+
         # Set the non-spin specific parameters.
         set_non_spin_params(value=val, param=param)
 

Modified: branches/N_state_model/specific_fns/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/specific_fns/n_state_model.py?rev=4861&r1=4860&r2=4861&view=diff
==============================================================================
--- branches/N_state_model/specific_fns/n_state_model.py (original)
+++ branches/N_state_model/specific_fns/n_state_model.py Mon Jan 21 11:22:37 
2008
@@ -524,6 +524,23 @@
             raise RelaxNoTensorError, ('alignment', tensor)
 
 
+    def set_non_spin_params(self, value=None, param=None):
+        """Function for setting all the N-state model parameter values.
+
+        @param value:   The parameter values.
+        @type value:    None, number, or list of numbers
+        @param param:   The parameter names.
+        @type param:    None, str, or list of str
+        """
+
+        # Alias the current data pipe.
+        cdp = relax_data_store[relax_data_store.current_pipe]
+
+        # Test if the N-state model has been set up.
+        if not hasattr(cdp, 'N'):
+            raise RelaxNoModelError, 'N-state'
+
+
     def set_type(self, tensor=None, red=None):
         """Set the whether the given tensor is the full or reduced tensor.
 




Related Messages


Powered by MHonArc, Updated Mon Jan 21 11:40:06 2008