mailr4855 - /1.3/generic_fns/value.py


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

Header


Content

Posted by edward on January 18, 2008 - 15:58:
Author: bugman
Date: Fri Jan 18 15:58:10 2008
New Revision: 4855

URL: http://svn.gna.org/viewcvs/relax?rev=4855&view=rev
Log:
Changed the way the model parameters are set in the set() function.


Modified:
    1.3/generic_fns/value.py

Modified: 1.3/generic_fns/value.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/value.py?rev=4855&r1=4854&r2=4855&view=diff
==============================================================================
--- 1.3/generic_fns/value.py (original)
+++ 1.3/generic_fns/value.py Fri Jan 18 15:58:10 2008
@@ -182,9 +182,24 @@
 
     # All model parameters (i.e. no parameters have been supplied).
     else:
-        # Let the specific code deal with this pain!
-        set_model_params(val, param, spin_id, force)
-
+        # Convert val to a list if necessary.
+        if type(val) != list or not isinstance(val, ndarray):
+            val = [val]
+
+        # Spin specific models.
+        if exists_mol_res_spin_data():
+            # Loop over the spins.
+            for spin in spin_loop(spin_id):
+                # Skip unselected spins.
+                if not spin.select:
+                    continue
+
+                # Set the individual parameter values.
+                for j in xrange(len(val)):
+                    set_spin_params(value=val[j], error=None, spin=spin, 
param=None)
+
+        # Set the non-spin specific parameters.
+        set_non_spin_params(value=val, param=param)
 
     # Reset all minimisation statistics.
     reset_min_stats()




Related Messages


Powered by MHonArc, Updated Fri Jan 18 16:20:14 2008