Author: bugman Date: Sat Jul 5 03:38:39 2008 New Revision: 6724 URL: http://svn.gna.org/viewcvs/relax?rev=6724&view=rev Log: Split the PDB creation code into the hetrogen and coordinate sections. 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=6724&r1=6723&r2=6724&view=diff ============================================================================== --- branches/rdc_analysis/generic_fns/structure/internal.py (original) +++ branches/rdc_analysis/generic_fns/structure/internal.py Sat Jul 5 03:38:39 2008 @@ -702,6 +702,10 @@ file.write("REMARK 40 CREATED BY RELAX (HTTP://NMR-RELAX.COM)\n") num_remark = 2 + + # Hetrogen section. + ################### + # Loop over the structures. for index in xrange(len(self.structural_data)): # Skip non-matching structures. @@ -816,6 +820,19 @@ # The FORMUL record (chemical formula). file.write("%-6s %2s %3s %2s%1s%-51s\n" % ('FORMUL', het[0], het[1], '', '', formula)) + + + # Coordinate section. + ##################### + + # Loop over the structures. + for index in xrange(len(self.structural_data)): + # Skip non-matching structures. + if struct_index != None and struct_index != index: + continue + + # Alias the structure container. + struct = self.structural_data[index] # MODEL record, for multiple structures.