mailr17017 - in /trunk: data/mol_res_spin.py generic_fns/mol_res_spin.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:36:
Author: bugman
Date: Thu Jun 21 10:36:48 2012
New Revision: 17017

URL: http://svn.gna.org/viewcvs/relax?rev=17017&view=rev
Log:
The spin ID lookup table has been made private so that it is not included in 
the save files.


Modified:
    trunk/data/mol_res_spin.py
    trunk/generic_fns/mol_res_spin.py

Modified: trunk/data/mol_res_spin.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/data/mol_res_spin.py?rev=17017&r1=17016&r2=17017&view=diff
==============================================================================
--- trunk/data/mol_res_spin.py (original)
+++ trunk/data/mol_res_spin.py Thu Jun 21 10:36:48 2012
@@ -665,8 +665,8 @@
         # Add the initial molecule container at index 0.
         self.append(MoleculeContainer())
 
-        # Create a special lookup table for fast spin access.
-        self.lookup_table = {}
+        # Create a special private lookup table for fast spin access.
+        self._lookup_table = {}
 
 
     def __repr__(self):

Modified: trunk/generic_fns/mol_res_spin.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/generic_fns/mol_res_spin.py?rev=17017&r1=17016&r2=17017&view=diff
==============================================================================
--- trunk/generic_fns/mol_res_spin.py (original)
+++ trunk/generic_fns/mol_res_spin.py Thu Jun 21 10:36:48 2012
@@ -1127,7 +1127,7 @@
 
         # Add the spin ID and indices to the lookup table.
         spin_id = generate_spin_id(mol_name=cdp.mol[mol_index].name, 
res_num=cdp.mol[mol_index].res[res_index].num, 
res_name=cdp.mol[mol_index].res[res_index].name, spin_num=spin.num, 
spin_name=spin.name)
-        cdp.mol.lookup_table[spin_id] = [mol_index, res_index, spin_index]
+        cdp.mol._lookup_table[spin_id] = [mol_index, res_index, spin_index]
 
     # Release the lock.
     finally:
@@ -1188,7 +1188,7 @@
         spin_id = generate_spin_id(mol_name=mol_name, res_num=res_num, 
res_name=res_name, spin_num=spin_num, spin_name=spin_name)
 
         # Add the spin ID and indices to the lookup table.
-        cdp.mol.lookup_table[spin_id] = [mol_index, res_index, spin_index]
+        cdp.mol._lookup_table[spin_id] = [mol_index, res_index, spin_index]
 
     # Release the lock.
     finally:
@@ -2384,11 +2384,11 @@
     dp = pipes.get_pipe(pipe)
 
     # No spin ID, so switch to selection matching.
-    if not dp.mol.lookup_table.has_key(spin_id):
+    if not dp.mol._lookup_table.has_key(spin_id):
         return return_spin_from_selection(selection=spin_id, pipe=pipe, 
full_info=full_info)
 
     # The indices from the look up table.
-    mol_index, res_index, spin_index = dp.mol.lookup_table[spin_id]
+    mol_index, res_index, spin_index = dp.mol._lookup_table[spin_id]
 
     # Return the data.
     if full_info:
@@ -2530,7 +2530,7 @@
     dp = pipes.get_pipe(pipe)
 
     # No spin ID, so switch to selection matching.
-    if not dp.mol.lookup_table.has_key(spin_id):
+    if not dp.mol._lookup_table.has_key(spin_id):
         # Parse the selection string.
         select_obj = Selection(spin_id)
 
@@ -2566,7 +2566,7 @@
 
     # The indices from the look up table.
     else:
-        mol_index, res_index, spin_index = dp.mol.lookup_table[spin_id]
+        mol_index, res_index, spin_index = dp.mol._lookup_table[spin_id]
 
     # Return the data.
     return mol_index, res_index, spin_index




Related Messages


Powered by MHonArc, Updated Thu Jun 21 22:00:02 2012