mailr17015 - /branches/interatomic/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 June 21, 2012 - 10:20:
Author: bugman
Date: Thu Jun 21 10:20:37 2012
New Revision: 17015

URL: http://svn.gna.org/viewcvs/relax?rev=17015&view=rev
Log:
The model-free data_init() method now sets boolean parameters to the default 
of False.

This excludes the selection flag which is set to True.  The data_init() 
method no longer uses the
data_names() API method but the self.PARAMS.loop() method for returning the 
parameter names.


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

Modified: branches/interatomic/specific_fns/model_free/main.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/interatomic/specific_fns/model_free/main.py?rev=17015&r1=17014&r2=17015&view=diff
==============================================================================
--- branches/interatomic/specific_fns/model_free/main.py (original)
+++ branches/interatomic/specific_fns/model_free/main.py Thu Jun 21 10:20:37 
2012
@@ -1230,11 +1230,8 @@
         @type sim:          bool
         """
 
-        # Get the data names.
-        data_names = self.data_names(scope='spin')
-
         # Loop over the data structure names.
-        for name in data_names:
+        for name in self.PARAMS.loop(scope='spin'):
             # Blacklisted data structures.
             if name in ['ri_data', 'ri_data_bc', 'ri_data_err']:
                 continue
@@ -1244,8 +1241,12 @@
             if name in list_data:
                 init_data = []
 
-            # Set everything else initially to None.
+            # Set everything else initially to None or False.
             init_data = None
+            if self.PARAMS.get_type(name) == bool:
+                init_data = False
+                if name == 'select':
+                    init_data = True
 
             # If the name is not in 'data_cont', add it.
             if not hasattr(data_cont, name):




Related Messages


Powered by MHonArc, Updated Thu Jun 21 10:40:02 2012