Author: bugman Date: Mon Jan 19 11:21:07 2009 New Revision: 8509 URL: http://svn.gna.org/viewcvs/relax?rev=8509&view=rev Log: More bug fixes for bond_vectors(). The index i no longer exists! Modified: branches/multi_structure/generic_fns/structure/internal.py Modified: branches/multi_structure/generic_fns/structure/internal.py URL: http://svn.gna.org/viewcvs/relax/branches/multi_structure/generic_fns/structure/internal.py?rev=8509&r1=8508&r2=8509&view=diff ============================================================================== --- branches/multi_structure/generic_fns/structure/internal.py (original) +++ branches/multi_structure/generic_fns/structure/internal.py Mon Jan 19 11:21:07 2009 @@ -486,9 +486,9 @@ atom_found = False # Loop over all atoms. - for j in xrange(len(mol.atom_name)): + for i in xrange(len(mol.atom_name)): # Skip non-matching atoms. - if sel_obj and not sel_obj.contains_spin(mol.atom_num[j], mol.atom_name[j], mol.res_num[j], mol.res_name[j], self.name[i]): + if sel_obj and not sel_obj.contains_spin(mol.atom_num[i], mol.atom_name[i], mol.res_num[i], mol.res_name[i], mol.name): continue # More than one matching atom! @@ -497,12 +497,12 @@ # The atom has been found, so store some info. atom_found = True - index = j + index = i # Found the atom. if atom_found: # Get the atom bonded to this model/molecule/residue/atom. - bonded_num, bonded_name, element, pos, attached_name, warnings = self.__bonded_atom(attached_atom, index, i) + bonded_num, bonded_name, element, pos, attached_name, warnings = self.__bonded_atom(attached_atom, index, mol) # No bonded atom. if (bonded_num, bonded_name, element) == (None, None, None):