mailr23339 - in /branches/frame_order_cleanup: ./ test_suite/system_tests/structure.py


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

Header


Content

Posted by edward on May 22, 2014 - 17:18:
Author: bugman
Date: Thu May 22 17:18:44 2014
New Revision: 23339

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

........
  r23336 | bugman | 2014-05-22 15:39:21 +0200 (Thu, 22 May 2014) | 6 lines
  
  Created the Structure.test_bug_22070_structure_superimpose_after_deletion 
system test.
  
  This is to catch bug #22070 (https://gna.org/bugs/index.php?22070), the 
failure of the
  structure.superimpose user function after deleting atoms with 
structure.delete.
........
  r23337 | bugman | 2014-05-22 16:09:50 +0200 (Thu, 22 May 2014) | 6 lines
  
  Added some checks to the 
Structure.test_bug_22070_structure_superimpose_after_deletion system test.
  
  These tests reveal the real problem - that the atoms of the second model 
have not been removed by
  the structure.delete user function.
........

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 May 22 17:18:44 2014
@@ -1 +1 @@
-/trunk:1-23334
+/trunk:1-23338

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=23339&r1=23338&r2=23339&view=diff
==============================================================================
--- branches/frame_order_cleanup/test_suite/system_tests/structure.py   
(original)
+++ branches/frame_order_cleanup/test_suite/system_tests/structure.py   Thu 
May 22 17:18:44 2014
@@ -207,6 +207,28 @@
 
         # Delete the calciums.
         self.interpreter.structure.delete(atom_id='@CA')
+
+
+    def test_bug_22070_structure_superimpose_after_deletion(self):
+        """Catch U{bug #22070<https://gna.org/bugs/?22070>}, the failure of 
the structure.superimpose user function after deleting atoms with 
structure.delete."""
+
+        # Path of the structure file.
+        path = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'frame_order'+sep+'cam'
+
+        # Load the structures to superimpose.
+        self.interpreter.structure.read_pdb('1J7P_1st_NH.pdb', dir=path, 
set_mol_name='C-dom', set_model_num=1)
+        self.interpreter.structure.read_pdb('1J7P_1st_NH_rot.pdb', dir=path, 
set_mol_name='C-dom', set_model_num=2)
+
+        # Delete the calciums.
+        self.interpreter.structure.delete(atom_id='@CA')
+
+        # Check the deleted atoms of both models (the last atoms should now 
be the last ATOM record proton and not the HETATOM CA).
+        for i in range(2):
+            print("Checking the last atom of model %s." % i)
+            
self.assertEqual(cdp.structure.structural_data[i].mol[0].atom_name[-1], 'H')
+
+        # Superimpose.
+        self.interpreter.structure.superimpose(method='fit to first', 
centre_type='CoM')
 
 
     def test_delete_empty(self):




Related Messages


Powered by MHonArc, Updated Thu May 22 17:40:02 2014