mailr6633 - /1.3/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 July 03, 2008 - 22:44:
Author: bugman
Date: Thu Jul  3 22:33:31 2008
New Revision: 6633

URL: http://svn.gna.org/viewcvs/relax?rev=6633&view=rev
Log:
Completed the conversion of the model-free duplicate_data() method to the new 
design.


Modified:
    1.3/specific_fns/model_free/main.py

Modified: 1.3/specific_fns/model_free/main.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/model_free/main.py?rev=6633&r1=6632&r2=6633&view=diff
==============================================================================
--- 1.3/specific_fns/model_free/main.py (original)
+++ 1.3/specific_fns/model_free/main.py Thu Jul  3 22:33:31 2008
@@ -1006,28 +1006,17 @@
             if ds[pipe_to].mol.is_empty():
                 sequence.copy(pipe_from=pipe_from, pipe_to=pipe_to)
 
-            # Create the sequence data if it does not exist.
-            if not ds.res.has_key(new_run) or not len(ds.res[new_run]):
-                # Add the new run to 'ds.res'.
-                ds.res.add_list(new_run)
-
-                # Fill the array 'ds.res[new_run]' with empty data 
containers and place sequence data into the array.
-                for i in xrange(len(ds.res[old_run])):
-                    # Append a data container.
-                    ds.res[new_run].add_item()
-
-                    # Insert the data.
-                    ds.res[new_run][i].num = ds.res[old_run][i].num
-                    ds.res[new_run][i].name = ds.res[old_run][i].name
-                    ds.res[new_run][i].select = ds.res[old_run][i].select
-
-            # Duplicate the residue specific data.
-            ds.res[new_run][model_index] = 
deepcopy(ds.res[old_run][model_index])
+            # Get the spin containers.
+            spin_from = return_spin_from_index(global_index=model_index, 
pipe=pipe_from) 
+            spin_to = return_spin_from_index(global_index=model_index, 
pipe=pipe_to) 
+
+            # Duplicate the spin specific data.
+            spin_to = deepcopy(spin_from)
 
         # Other data types.
         else:
-            # Duplicate the residue specific data.
-            ds.res[new_run] = deepcopy(ds.res[old_run])
+            # Duplicate all the spin specific data.
+            ds[pipe_to].mol = deepcopy(ds[pipe_from].mol)
 
 
     def eliminate(self, name, value, run, i, args):




Related Messages


Powered by MHonArc, Updated Thu Jul 03 23:00:22 2008