Author: bugman Date: Wed Oct 1 19:44:39 2014 New Revision: 26121 URL: http://svn.gna.org/viewcvs/relax?rev=26121&view=rev Log: Bug fix for the CONECT records created by the structure.write_pdb user function. The atom numbers inside the structural object were being used for the CONECT records rather than the atom numbers used within the PDB file. Modified: trunk/lib/structure/internal/object.py Modified: trunk/lib/structure/internal/object.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/structure/internal/object.py?rev=26121&r1=26120&r2=26121&view=diff ============================================================================== --- trunk/lib/structure/internal/object.py (original) +++ trunk/lib/structure/internal/object.py Wed Oct 1 19:44:39 2014 @@ -2937,11 +2937,7 @@ # Convert the atom indices to atom numbers. for k in range(4): if bonded[k] != '': - if mol.atom_num[bonded[k]] != None: - bonded[k] = mol.atom_num[bonded[k]] - else: - bonded[k] = bonded[k] + 1 - bonded_shifted[k] = bonded[k] + atom_counts[index] + bonded_shifted[k] = bonded[k] + 1 + atom_counts[index] # Write the CONECT record. pdb_write.conect(file, serial=i+1+atom_counts[index], bonded1=bonded_shifted[0], bonded2=bonded_shifted[1], bonded3=bonded_shifted[2], bonded4=bonded_shifted[3])