mailr13211 - /branches/xyz/generic_fns/structure/main.py


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

Header


Content

Posted by hasu on June 24, 2011 - 11:06:
Author: han87
Date: Fri Jun 24 11:06:46 2011
New Revision: 13211

URL: http://svn.gna.org/viewcvs/relax?rev=13211&view=rev
Log:
Debugging the user function load_spins()

Debugging the user function load_spins() in generic_fns/structure/main.py for 
a proper residue check as suggest in: 
https://mail.gna.org/public/relax-devel/2011-06/msg00231.html.

Modified:
    branches/xyz/generic_fns/structure/main.py

Modified: branches/xyz/generic_fns/structure/main.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/xyz/generic_fns/structure/main.py?rev=13211&r1=13210&r2=13211&view=diff
==============================================================================
--- branches/xyz/generic_fns/structure/main.py (original)
+++ branches/xyz/generic_fns/structure/main.py Fri Jun 24 11:06:46 2011
@@ -229,10 +229,13 @@
                 mol_cont = cdp.mol[-1]
 
         # Add the residue number to the ID string (residue name is ignored 
because only the number is unique).
-        id = id + ':' + repr(res_num)
-
-        # Get the corresponding residue container.
-        res_cont = return_residue(id)
+        res_cont = None
+        if res_name:
+            # Update the ID string
+            id = id + ':' + res_name
+
+            # Get the corresponding residue container.
+            res_cont = return_residue(id)
 
         # Add the residue if it doesn't exist.
         if res_cont == None:




Related Messages


Powered by MHonArc, Updated Fri Jun 24 11:20:02 2011