mailr6723 - in /branches/rdc_analysis/generic_fns/structure: api_base.py 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 - 03:35:
Author: bugman
Date: Sat Jul  5 03:35:15 2008
New Revision: 6723

URL: http://svn.gna.org/viewcvs/relax?rev=6723&view=rev
Log:
The MODEL and ENDMDL records are now created, if multiple structures exist.


Modified:
    branches/rdc_analysis/generic_fns/structure/api_base.py
    branches/rdc_analysis/generic_fns/structure/internal.py

Modified: branches/rdc_analysis/generic_fns/structure/api_base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/generic_fns/structure/api_base.py?rev=6723&r1=6722&r2=6723&view=diff
==============================================================================
--- branches/rdc_analysis/generic_fns/structure/api_base.py (original)
+++ branches/rdc_analysis/generic_fns/structure/api_base.py Sat Jul  5 
03:35:15 2008
@@ -429,6 +429,20 @@
          
|_________|______________|______________|________________________________________________|
 
 
+        ENDMDL record
+        ------------
+
+        The end of model record, for multiple structures.  The format of the 
record is::
+         
__________________________________________________________________________________________
+         |         |              |              |                           
                     |
+         | Columns | Data type    | Field        | Definition                
                     |
+         
|_________|______________|______________|________________________________________________|
+         |         |              |              |                           
                     |
+         |  1 -  6 | Record name  | "ENDMDL"     |                           
                     |
+         
|_________|______________|______________|________________________________________________|
+
+
+
         MASTER record
         -------------
 

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=6723&r1=6722&r2=6723&view=diff
==============================================================================
--- branches/rdc_analysis/generic_fns/structure/internal.py (original)
+++ branches/rdc_analysis/generic_fns/structure/internal.py Sat Jul  5 
03:35:15 2008
@@ -703,13 +703,13 @@
         num_remark = 2
 
         # Loop over the structures.
-        for i in xrange(len(self.structural_data)):
+        for index in xrange(len(self.structural_data)):
             # Skip non-matching structures.
-            if struct_index != None and struct_index != i:
+            if struct_index != None and struct_index != index:
                 continue
 
             # Alias the structure container.
-            struct = self.structural_data[i]
+            struct = self.structural_data[index]
 
             # Check the validity of the data.
             self.__validate_data_arrays(struct)
@@ -816,6 +816,17 @@
 
                 # The FORMUL record (chemical formula).
                 file.write("%-6s  %2s  %3s %2s%1s%-51s\n" % ('FORMUL', 
het[0], het[1], '', '', formula))
+
+
+            # MODEL record, for multiple structures.
+            ########################################
+
+            if not struct_index and len(self.structural_data) > 1:
+                # Print out.
+                print "\nMODEL " + `index+1`
+
+                # Write the model record.
+                file.write("%-6s    %4i\n" % ('MODEL', index+1))
 
 
             # Add the atomic coordinate records (ATOM, HETATM, and TER).
@@ -925,6 +936,18 @@
                         num_conect = num_conect + 1
 
 
+            # ENDMDL record, for multiple structures.
+            ########################################
+
+            if not struct_index and len(self.structural_data) > 1:
+                # Print out.
+                print "Creating the ENDMDL record."
+
+                # Write the model record.
+                file.write("%-6s\n" % 'ENDMDL')
+
+
+
         # MASTER record.
         ################
 




Related Messages


Powered by MHonArc, Updated Sat Jul 05 03:40:12 2008