mailr9655 - /1.3/generic_fns/structure/internal.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on October 08, 2009 - 10:24:
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]])
 
 




Related Messages


Powered by MHonArc, Updated Thu Oct 08 11:00:02 2009