mailr26120 - /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:37 2014
New Revision: 26120

URL: http://svn.gna.org/viewcvs/relax?rev=26120&view=rev
Log:
Another bug fix for the structure.delete user function when deleting 
individual atoms.

The bonded atom data structure consisting of indices requires all indices 
after the deleted atom to
be decremented by 1.

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=26120&r1=26119&r2=26120&view=diff
==============================================================================
--- trunk/lib/structure/internal/object.py      (original)
+++ trunk/lib/structure/internal/object.py      Wed Oct  1 19:44:37 2014
@@ -1614,6 +1614,11 @@
                             if i in mol.bonded[j]:
                                 mol.bonded[j].pop(mol.bonded[j].index(i))
 
+                        # Update the bonded lists, as the indices need to be 
shifted.
+                        for j in range(i, len(mol.bonded)):
+                            for k in range(len(mol.bonded[j])):
+                                mol.bonded[j][k] -= 1
+
             # Nothing more to do.
             if not len(del_res_nums):
                 return




Related Messages


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