Author: bugman Date: Fri Feb 1 11:48:46 2013 New Revision: 18338 URL: http://svn.gna.org/viewcvs/relax?rev=18338&view=rev Log: Fix for the bug reported as the support request #2998 (https://gna.org/support/?2998). CONECT records pointing to non-existent atoms can now be handled. 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=18338&r1=18337&r2=18338&view=diff ============================================================================== --- trunk/generic_fns/structure/internal.py (original) +++ trunk/generic_fns/structure/internal.py Fri Feb 1 11:48:46 2013 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2003-2012 Edward d'Auvergne # +# Copyright (C) 2003-2013 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -2117,6 +2117,10 @@ if record[i+2] == None: continue + # Skip broken CONECT records (for when the record points to a non-existent atom). + if self._atom_index(record[1]) == None or self._atom_index(record[i+2]) == None: + continue + # Make the connection. self.atom_connect(index1=self._atom_index(record[1]), index2=self._atom_index(record[i+2]))