Author: bugman Date: Thu Oct 8 10:24:34 2009 New Revision: 9655 URL: http://svn.gna.org/viewcvs/relax?rev=9655&view=rev Log: Bug fix for __find_bonded_atoms(). The loop over the maximum number of connect atoms was failing if the number of 'connected' atoms was less. Modified: 1.3/generic_fns/structure/internal.py Modified: 1.3/generic_fns/structure/internal.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/internal.py?rev=9655&r1=9654&r2=9655&view=diff ============================================================================== --- 1.3/generic_fns/structure/internal.py (original) +++ 1.3/generic_fns/structure/internal.py Thu Oct 8 10:24:34 2009 @@ -176,8 +176,8 @@ # Sort. dist_list.sort() - # Loop over the max number of connections. - for i in range(max_conn): + # Loop over the max number of connections (or the number of connected atoms, if less). + for i in range(min(max_conn, len(dist_list))): mol.atom_connect(index, connect_list[dist_list[i]])