mailr6711 - /branches/rdc_analysis/generic_fns/structure/internal.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on July 05, 2008 - 01:21:
Author: bugman
Date: Sat Jul  5 01:05:10 2008
New Revision: 6711

URL: http://svn.gna.org/viewcvs/relax?rev=6711&view=rev
Log:
Fixed the creation of the FORMUL record.


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=6711&r1=6710&r2=6711&view=diff
==============================================================================
--- branches/rdc_analysis/generic_fns/structure/internal.py (original)
+++ branches/rdc_analysis/generic_fns/structure/internal.py Sat Jul  5 
01:05:10 2008
@@ -797,23 +797,9 @@
                 # Initialise the chemical formula.
                 formula = ''
 
-                # Protons.
-                if het[4]:
-                    if formula:
-                        formula = formula + ' '
-                    formula = formula + 'H' + `het[4]`
-
-                # Carbon.
-                if het[5]:
-                    if formula:
-                        formula = formula + ' '
-                    formula = formula + 'C' + `het[5]`
-
-                # Nitrogen
-                if het[6]:
-                    if formula:
-                        formula = formula + ' '
-                    formula = formula + 'N' + `het[6]`
+                # Loop over the atoms.
+                for atom_count in het[4]:
+                    formula = formula + atom_count[0] + `atom_count[1]`
 
                 # The FORMUL record (chemical formula).
                 file.write("%-6s  %2s  %3s %2s%1s%-51s\n" % ('FORMUL', 
het[0], het[1], '', '', formula))




Related Messages


Powered by MHonArc, Updated Sat Jul 05 01:40:17 2008