Author: bugman Date: Tue Mar 19 16:24:02 2013 New Revision: 18885 URL: http://svn.gna.org/viewcvs/relax?rev=18885&view=rev Log: Fixes for the helix metadata deletion for the internal structural object. This affects the structure.delete user function. Modified: trunk/generic_fns/structure/internal.py Modified: trunk/generic_fns/structure/internal.py URL: http://svn.gna.org/viewcvs/relax/trunk/generic_fns/structure/internal.py?rev=18885&r1=18884&r2=18885&view=diff ============================================================================== --- trunk/generic_fns/structure/internal.py (original) +++ trunk/generic_fns/structure/internal.py Tue Mar 19 16:24:02 2013 @@ -1373,17 +1373,22 @@ mol.element.pop(i) mol.pdb_record.pop(i) mol.res_name.pop(i) - del_res_nums.append(mol.res_num.pop(i)) + res_num = mol.res_num.pop(i) mol.seg_id.pop(i) mol.x.pop(i) mol.y.pop(i) mol.z.pop(i) + # The residue no longer exists. + if res_num not in mol.res_num and res_num not in del_res_nums: + del_res_nums.append(res_num) + # Nothing more to do. if not len(del_res_nums): return # Handle the helix metadata. + del_res_nums.reverse() del_helix_indices = [] for i in range(len(self.helices)): # Trim the helix.