mailr2895 - in /1.3: generic_fns/monte_carlo.py specific_fns/model_free.py


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

Header


Content

Posted by edward on November 30, 2006 - 10:37:
Author: bugman
Date: Thu Nov 30 10:37:25 2006
New Revision: 2895

URL: http://svn.gna.org/viewcvs/relax?rev=2895&view=rev
Log:
Renamed the Numeric matrix 'select_sim' to 'all_select_sim'.

This matrix contains the Monte Carlo simulation selection status of all spin 
systems of all
simulations.  Hence the name 'all_select_sim' has been chosen to 
differentiate it from the array
'select_sim' stored at 'self.relax.data.res[run]'.


Modified:
    1.3/generic_fns/monte_carlo.py
    1.3/specific_fns/model_free.py

Modified: 1.3/generic_fns/monte_carlo.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/monte_carlo.py?rev=2895&r1=2894&r2=2895&view=diff
==============================================================================
--- 1.3/generic_fns/monte_carlo.py (original)
+++ 1.3/generic_fns/monte_carlo.py Thu Nov 30 10:37:25 2006
@@ -307,7 +307,7 @@
         self.relax.data.sim_state[self.run] = 1
 
 
-    def select_all_sims(self, number=None, select_sim=None):
+    def select_all_sims(self, number=None, all_select_sim=None):
         """Function for setting the select flag of all simulations of all 
instances to one."""
 
         # Function type.
@@ -321,32 +321,30 @@
         num_instances = count_num_instances(self.run)
 
         # Create the selected simulation array with all simulations selected.
-        if select_sim == None:
-            all_selected = ones(number)
+        if all_select_sim == None:
+            select_sim = ones(number)
 
         # Loop over the instances.
         for instance in xrange(num_instances):
             # Set up the selected simulation array.
-            if select_sim == None:
-                selected_sims = all_selected
-            else:
-                selected_sims = select_sim[instance].tolist()
+            if all_select_sim != None:
+                select_sim = all_select_sim[instance].tolist()
 
             # Set the selected simulation array.
-            set_selected_sim(self.run, instance, selected_sims)
-
-
-    def setup(self, run=None, number=None, select_sim=None):
+            set_selected_sim(self.run, instance, select_sim)
+
+
+    def setup(self, run=None, number=None, all_select_sim=None):
         """Function for setting up Monte Carlo simulations.
         
-        @param run:         The name of the run.
-        @type run:          str
-        @param number:      The number of Monte Carlo simulations to set up.
-        @type number:       int
-        @params select_sim: The selection status of the Monte Carlo 
simulations.  The first
+        @param run:             The name of the run.
+        @type run:              str
+        @param number:          The number of Monte Carlo simulations to set 
up.
+        @type number:           int
+        @params all_select_sim: The selection status of the Monte Carlo 
simulations.  The first
             dimension of this matrix corresponds to the simulation and the 
second corresponds to the
             instance.
-        @type select_sim:   Numeric matrix (int)
+        @type all_select_sim:   Numeric matrix (int)
         """
 
         # Arguments.
@@ -375,4 +373,4 @@
         self.relax.data.sim_state[self.run] = 1
 
         # Select all simulations.
-        self.select_all_sims(number=number, select_sim=select_sim)
+        self.select_all_sims(number=number, all_select_sim=all_select_sim)

Modified: 1.3/specific_fns/model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/model_free.py?rev=2895&r1=2894&r2=2895&view=diff
==============================================================================
--- 1.3/specific_fns/model_free.py (original)
+++ 1.3/specific_fns/model_free.py Thu Nov 30 10:37:25 2006
@@ -1420,7 +1420,8 @@
 
         # Local tm.
         if name == 'local_tm' and value >= c1:
-            print "The local tm parameter of " + `value` + " is greater than 
" + `c1` + ", eliminating residue " + `self.relax.data.res[run][i].num` + " " 
+ self.relax.data.res[run][i].name
+            print "The local tm parameter of " + `value` + " is greater than 
" + `c1` + ", eliminating spin system " + `self.relax.data.res[run][i].num` + 
" " + self.rel
+ax.data.res[run][i].name + " of the run " + `run`
             return 1
 
         # Internal correlation times.
@@ -3337,7 +3338,7 @@
         nucleus_set = 0
         sim_num = None
         sims = []
-        select_sim = []
+        all_select_sim = []
         diff_data_set = 0
         diff_error_set = 0
         diff_sim_set = None
@@ -3395,10 +3396,10 @@
                 if sim_num not in sims:
                     # Update the sims array and append an empty array to the 
selected sims array.
                     sims.append(sim_num)
-                    select_sim.append([])
+                    all_select_sim.append([])
 
                 # Selected simulations.
-                
select_sim[-1].append(int(self.file_line[self.col['select']]))
+                
all_select_sim[-1].append(int(self.file_line[self.col['select']]))
 
             # Diffusion tensor data.
             if self.data_set == 'value' and not diff_data_set:
@@ -3437,10 +3438,10 @@
         # Set up the simulations.
         if len(sims):
             # Convert the selected simulation array of arrays into a Numeric 
matrix and transpose it.
-            select_sim = transpose(array(select_sim))
+            all_select_sim = transpose(array(all_select_sim))
 
             # Set up the Monte Carlo simulations.
-            self.relax.generic.monte_carlo.setup(self.run, number=len(sims), 
select_sim=select_sim)
+            self.relax.generic.monte_carlo.setup(self.run, number=len(sims), 
all_select_sim=all_select_sim)
 
 
     def read_columnar_sequence(self):




Related Messages


Powered by MHonArc, Updated Thu Nov 30 11:00:06 2006