Author: bugman
Date: Fri Feb 20 09:27:20 2015
New Revision: 27681

URL: http://svn.gna.org/viewcvs/relax?rev=27681&view=rev
Log:
Merged revisions 27680 via svnmerge from 
svn+ssh://bug...@svn.gna.org/svn/relax/trunk

........
  r27680 | bugman | 2015-02-20 09:26:57 +0100 (Fri, 20 Feb 2015) | 9 lines
  
  Created the Structure.test_bug_23294_multi_mol_automerge system test.
  
  This is used to catch bug #2329 (https://gna.org/bugs/?23294), the automatic 
merging of PDB
  molecules resulting in an IndexError.  It reads in the 'in.pdb' PDB file 
attached to the bug report,
  now named 'bug_23294_multi_mol_automerge.pdb', to show the IndexError.  The 
test also checks the
  structure.write_pdb user function to make sure that the output PDB file 
contains a single merged
  molecule.
........

Modified:
    branches/nmrglue/   (props changed)
    branches/nmrglue/test_suite/system_tests/structure.py

Propchange: branches/nmrglue/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Feb 20 09:27:20 2015
@@ -1 +1 @@
-/trunk:1-27677
+/trunk:1-27680

Modified: branches/nmrglue/test_suite/system_tests/structure.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/nmrglue/test_suite/system_tests/structure.py?rev=27681&r1=27680&r2=27681&view=diff
==============================================================================
--- branches/nmrglue/test_suite/system_tests/structure.py       (original)
+++ branches/nmrglue/test_suite/system_tests/structure.py       Fri Feb 20 
09:27:20 2015
@@ -883,6 +883,39 @@
             "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"
+        ]
+
+        # 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_23294_multi_mol_automerge(self):
+        """Catch U{bug #23294<https://gna.org/bugs/?23294>}, the automatic 
merging of PDB molecules results in an IndexError."""
+
+        # 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_23294_multi_mol_automerge.pdb', 
dir=path, read_model=1, set_mol_name='merged mol')
+
+        # 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 = [
+            "MODEL        1                                                    
              \n",
+            "ATOM      1  N   LEU A   1       1.000   0.000   0.000  1.00  
0.00           N  \n",
+            "ATOM      2  H   LEU A   1       2.000   0.000   0.000  1.00  
0.00           H  \n",
+            "ATOM      3  N   GLU A   2       3.000   0.000   0.000  1.00  
0.00           N  \n",
+            "ATOM      4  H   GLU A   2       4.000   0.000   0.000  1.00  
0.00           H  \n",
+            "TER       5      GLU A   2                                        
              \n",
+            "ENDMDL                                                            
              \n",
             "END                                                               
              \n"
         ]
 


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

Reply via email to