mailr27669 - in /branches/frame_order_cleanup: ./ test_suite/shared_data/structures/ test_suite/system_tests/


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

Header


Content

Posted by edward on February 19, 2015 - 14:23:
Author: bugman
Date: Thu Feb 19 14:23:38 2015
New Revision: 27669

URL: http://svn.gna.org/viewcvs/relax?rev=27669&view=rev
Log:
Merged revisions 27667 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r27667 | bugman | 2015-02-19 14:22:50 +0100 (Thu, 19 Feb 2015) | 6 lines
  
  Created the Structure.test_bug_23293_missing_hetatm system test.
  
  This is to catch bug #23293 (https://gna.org/bugs/?23293), the PDB HETATM 
loading error whereby the
  last HETATM record is sometimes not read from the PDB file.
........

Added:
    
branches/frame_order_cleanup/test_suite/shared_data/structures/bug_23293_missing_hetatm.pdb
      - copied unchanged from r27667, 
trunk/test_suite/shared_data/structures/bug_23293_missing_hetatm.pdb
Modified:
    branches/frame_order_cleanup/   (props changed)
    branches/frame_order_cleanup/test_suite/system_tests/structure.py

Propchange: branches/frame_order_cleanup/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Feb 19 14:23:38 2015
@@ -1 +1 @@
-/trunk:1-27664
+/trunk:1-27667

Modified: branches/frame_order_cleanup/test_suite/system_tests/structure.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/test_suite/system_tests/structure.py?rev=27669&r1=27668&r2=27669&view=diff
==============================================================================
--- branches/frame_order_cleanup/test_suite/system_tests/structure.py   
(original)
+++ branches/frame_order_cleanup/test_suite/system_tests/structure.py   Thu 
Feb 19 14:23:38 2015
@@ -831,6 +831,58 @@
             "ATOM      1  N   Phe A   1       1.000   1.000   1.000  1.00  
0.00           N  \n",
             "TER       2      Phe A   1                                      
                \n",
             "MASTER        0    0    0    0    0    0    0    0    1    1    
0    0          \n",
+            "END                                                             
                \n"
+        ]
+
+        # Check the created PDB file.
+        lines = file.readlines()
+        self.strip_remarks(lines)
+        self.assertEqual(len(contents), len(lines))
+        for i in range(len(lines)):
+            self.assertEqual(contents[i], lines[i])
+
+
+    def test_bug_23293_missing_hetatm(self):
+        """Catch U{bug #23293<https://gna.org/bugs/?23293>}, the PDB HETATM 
loading error whereby the last HETATM record is sometimes not read from the 
PDB file."""
+
+        # Path of the structure file.
+        path = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'structures'
+
+        # Load the file.
+        self.interpreter.structure.read_pdb('bug_23293_missing_hetatm.pdb', 
dir=path)
+
+        # Create a PDB file.
+        file = DummyFileObject()
+        self.interpreter.structure.write_pdb(file=file, force=True)
+
+        # The file contents, without remarks, as they should be.
+        contents = [
+            "HET     CA  A 501       1                                       
                \n",
+            "HET     CA  A 502       1                                       
                \n",
+            "HET     CA  B 503       1                                       
                \n",
+            "HET     CA  B 504       1                                       
                \n",
+            "HET     CA  B 505       1                                       
                \n",
+            "HET     CA  B 506       1                                       
                \n",
+            "HETNAM      CA UNKNOWN                                          
                \n",
+            "FORMUL   1   CA    CA1                                          
                \n",
+            "MODEL        1                                                  
                \n",
+            "ATOM      1  N   LEU A   1       1.000  -2.000  20.000  1.00  
0.00           N  \n",
+            "ATOM      2  H   LEU A   1       2.000  -2.000  20.000  1.00  
0.00           H  \n",
+            "TER       3      LEU A   1                                      
                \n",
+            "HETATM    4   CA  CA A 501      17.000  12.000  14.000  1.00  
0.00          CA  \n",
+            "HETATM    5   CA  CA A 502       6.000   9.000  14.000  1.00  
0.00          CA  \n",
+            "ATOM      6  N   LEU B   1       9.000  -9.000  27.000  1.00  
0.00           N  \n",
+            "ATOM      7  H   LEU B   1       8.000  -8.000  27.000  1.00  
0.00           H  \n",
+            "TER       8      LEU B   1                                      
                \n",
+            "HETATM    9   CA  CA B 503      17.000  12.000  14.000  1.00  
0.00          CA  \n",
+            "HETATM   10   CA  CA B 504       6.000   9.000  14.000  1.00  
0.00          CA  \n",
+            "ATOM     11  N   LEU C   1      12.000 -12.000   7.000  1.00  
0.00           N  \n",
+            "ATOM     12  H   LEU C   1      11.000 -12.000   7.000  1.00  
0.00           H  \n",
+            "TER      13      LEU C   1                                      
                \n",
+            "HETATM   14   CA  CA C 505      31.000 -10.000  -0.000  1.00  
0.00          CA  \n",
+            "HETATM   15   CA  CA C 506      31.000 -19.000   6.000  1.00  
0.00          CA  \n",
+            "ENDMDL                                                          
                \n",
+            "MASTER        0    0    6    0    0    0    0    0   12    3    
0    0          \n",
             "END                                                             
                \n"
         ]
 




Related Messages


Powered by MHonArc, Updated Thu Feb 19 14:40:02 2015