Author: bugman Date: Wed Feb 20 17:20:17 2013 New Revision: 18544 URL: http://svn.gna.org/viewcvs/relax?rev=18544&view=rev Log: Fix for the creation of the FORMUL PDB records by the internal structural object. The component number is now set to the index of the hetrogen plus one. This number should have been a sequential number starting at 1 and is not related to the residue number in any way. Modified: trunk/generic_fns/structure/internal.py Modified: trunk/generic_fns/structure/internal.py URL: http://svn.gna.org/viewcvs/relax/trunk/generic_fns/structure/internal.py?rev=18544&r1=18543&r2=18544&view=diff ============================================================================== --- trunk/generic_fns/structure/internal.py (original) +++ trunk/generic_fns/structure/internal.py Wed Feb 20 17:20:17 2013 @@ -1754,7 +1754,10 @@ # Loop over the non-standard residues and generate and write the chemical formula. residues = [] - for het in het_data_coll: + for i in range(len(het_data_coll)): + # Alias. + het = het_data_coll[i] + # Test if the residue HETNAM record as already been written (otherwise store its name). if het[1] in residues: continue @@ -1769,7 +1772,7 @@ formula = formula + atom_count[0] + repr(atom_count[1]) # The FORMUL record (chemical formula). - pdb_write.formul(file, comp_num=het[0], het_id=het[1], text=formula) + pdb_write.formul(file, comp_num=i+1, het_id=het[1], text=formula) ######################