Author: bugman Date: Sat Jul 5 01:57:38 2008 New Revision: 6717 URL: http://svn.gna.org/viewcvs/relax?rev=6717&view=rev Log: Fixed the creation of the CONECT record, really this time! Modified: branches/rdc_analysis/generic_fns/structure/internal.py Modified: branches/rdc_analysis/generic_fns/structure/internal.py URL: http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/generic_fns/structure/internal.py?rev=6717&r1=6716&r2=6717&view=diff ============================================================================== --- branches/rdc_analysis/generic_fns/structure/internal.py (original) +++ branches/rdc_analysis/generic_fns/structure/internal.py Sat Jul 5 01:57:38 2008 @@ -895,8 +895,13 @@ # Generate the CONECT record and increment the counter. if flush: + # Convert the atom indecies to atom numbers. + for k in range(4): + if bonded[k] != '': + bonded[k] = struct.atom_num[bonded[k]] + # Write the CONECT record. - file.write("%-6s%5s%5s%5s%5s%5s%5s%5s%5s%5s%5s%5s\n" % ('CONECT', i+1, struct.atom_num[bonded[0]], struct.atom_num[bonded[1]], struct.atom_num[bonded[2]], struct.atom_num[bonded[3]], '', '', '', '', '', '')) + file.write("%-6s%5s%5s%5s%5s%5s%5s%5s%5s%5s%5s%5s\n" % ('CONECT', i+1, bonded[0], bonded[1], bonded[2], bonded[3], '', '', '', '', '', '')) # Increment the CONECT record count. connect_count = connect_count + 1