mailr2452 - in /1.2/specific_fns: hybrid.py model_free.py


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

Header


Content

Posted by edward on April 07, 2006 - 04:26:
Author: bugman
Date: Fri Apr  7 04:26:16 2006
New Revision: 2452

URL: http://svn.gna.org/viewcvs/relax?rev=2452&view=rev
Log:
The run type 'hybrid' model-statistic returning function now handles numerous 
instances.


Modified:
    1.2/specific_fns/hybrid.py
    1.2/specific_fns/model_free.py

Modified: 1.2/specific_fns/hybrid.py
URL: 
http://svn.gna.org/viewcvs/relax/1.2/specific_fns/hybrid.py?rev=2452&r1=2451&r2=2452&view=diff
==============================================================================
--- 1.2/specific_fns/hybrid.py (original)
+++ 1.2/specific_fns/hybrid.py Fri Apr  7 04:26:16 2006
@@ -110,16 +110,26 @@
             # Function type.
             function_type = 
self.relax.data.run_types[self.relax.data.run_names.index(run)]
 
-            # Specific model statistics functions.
+            # Specific model statistics and number of instances functions.
             model_statistics = 
self.relax.specific_setup.setup('model_stats', function_type)
+            num_instances = self.relax.specific_setup.setup('num_instances', 
function_type)
 
-            # Get the statistics.
-            k, n, chi2 = model_statistics(run, instance=0, min_instances=1)
+            # Number of instances.
+            num = num_instances(run)
 
-            # Sum the stats.
-            k_total = k_total + k
-            n_total = n_total + n
-            chi2_total = chi2_total + chi2
+            # Loop over the instances.
+            for i in xrange(num):
+                # Get the statistics.
+                k, n, chi2 = model_statistics(run, instance=i, 
num_instances=num)
+
+                # Bad stats.
+                if k == None or n == None or chi2 == None:
+                    continue
+
+                # Sum the stats.
+                k_total = k_total + k
+                n_total = n_total + n
+                chi2_total = chi2_total + chi2
 
         # Return the totals.
         return k_total, n_total, chi2_total

Modified: 1.2/specific_fns/model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/1.2/specific_fns/model_free.py?rev=2452&r1=2451&r2=2452&view=diff
==============================================================================
--- 1.2/specific_fns/model_free.py (original)
+++ 1.2/specific_fns/model_free.py Fri Apr  7 04:26:16 2006
@@ -2513,6 +2513,10 @@
         # Sequence specific data.
         # Statistics for a single residue.
         if not global_stats and not combine:
+            # Skip unselected residues.
+            if not self.relax.data.res[self.run][instance].select:
+                return None, None, None
+
             # Missing data sets.
             if not hasattr(self.relax.data.res[self.run][instance], 
'relax_data'):
                 return None, None, None




Related Messages


Powered by MHonArc, Updated Fri Apr 07 06:20:05 2006