mailr26117 - /trunk/lib/structure/internal/object.py


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

Header


Content

Posted by edward on October 01, 2014 - 19:44:
Author: bugman
Date: Wed Oct  1 19:44:32 2014
New Revision: 26117

URL: http://svn.gna.org/viewcvs/relax?rev=26117&view=rev
Log:
Bug fix for the structure.delete user function.

When individual atoms are deleted, the bonded atom data structure is no 
correctly updated to remove
the now non-existent atom.

Modified:
    trunk/lib/structure/internal/object.py

Modified: trunk/lib/structure/internal/object.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/structure/internal/object.py?rev=26117&r1=26116&r2=26117&view=diff
==============================================================================
--- trunk/lib/structure/internal/object.py      (original)
+++ trunk/lib/structure/internal/object.py      Wed Oct  1 19:44:32 2014
@@ -1609,6 +1609,11 @@
                         if res_num not in mol.res_num and res_num not in 
del_res_nums:
                             del_res_nums.append(res_num)
 
+                        # Second atom of the bonded pair.
+                        for j in range(len(mol.bonded)):
+                            if i in mol.bonded[j]:
+                                mol.bonded[j].pop(mol.bonded[j].index(i))
+
             # Nothing more to do.
             if not len(del_res_nums):
                 return




Related Messages


Powered by MHonArc, Updated Wed Oct 01 20:00:03 2014