mailr6546 - /1.3/data/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 29, 2008 - 00:05:
Author: bugman
Date: Sun Jun 29 00:05:32 2008
New Revision: 6546

URL: http://svn.gna.org/viewcvs/relax?rev=6546&view=rev
Log:
Fixed the setting of molecule, residue, and spin names and numbers.


Modified:
    1.3/data/mol_res_spin.py

Modified: 1.3/data/mol_res_spin.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/data/mol_res_spin.py?rev=6546&r1=6545&r2=6546&view=diff
==============================================================================
--- 1.3/data/mol_res_spin.py (original)
+++ 1.3/data/mol_res_spin.py Sun Jun 29 00:05:32 2008
@@ -197,8 +197,10 @@
         # Loop over the spins.
         for spin_node in spin_nodes:
             # Get the spin details and add the spin to the SpinList 
structure.
-            name = spin_node.getAttribute('name')
-            num = spin_node.getAttribute('num')
+            name = str(spin_node.getAttribute('name'))
+            if name == 'None':
+                name = None
+            num = eval(spin_node.getAttribute('num'))
             self.add_item(spin_name=name, spin_num=num)
 
             # Recreate the current spin container.
@@ -441,8 +443,10 @@
         # Loop over the residues.
         for res_node in res_nodes:
             # Get the residue details and add the residue to the ResidueList 
structure.
-            name = res_node.getAttribute('name')
-            num = res_node.getAttribute('num')
+            name = str(res_node.getAttribute('name'))
+            if name == 'None':
+                name = None
+            num = eval(res_node.getAttribute('num'))
             self.add_item(res_name=name, res_num=num)
 
             # Get the spin nodes.
@@ -639,7 +643,9 @@
         # Loop over the molecules.
         for mol_node in mol_nodes:
             # Get the molecule details and add the molecule to the 
MoleculeList structure.
-            name = mol_node.getAttribute('name')
+            name = eval(mol_node.getAttribute('name'))
+            if name == 'None':
+                name = None
             self.add_item(mol_name=name)
 
             # Get the residue nodes.




Related Messages


Powered by MHonArc, Updated Sun Jun 29 01:00:22 2008