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


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
[email protected]

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

Reply via email to