mailr27058 - /trunk/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 December 10, 2014 - 16:37:
Author: bugman
Date: Wed Dec 10 16:37:18 2014
New Revision: 27058

URL: http://svn.gna.org/viewcvs/relax?rev=27058&view=rev
Log:
Created the Structure.test_rmsd_molecules system test.

This will be used to implement a new molecules argument for the 
structure.rmsd user function so that
the RMSD between different molecules rather than different models can be 
calculated.


Modified:
    trunk/test_suite/system_tests/structure.py

Modified: trunk/test_suite/system_tests/structure.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/structure.py?rev=27058&r1=27057&r2=27058&view=diff
==============================================================================
--- trunk/test_suite/system_tests/structure.py  (original)
+++ trunk/test_suite/system_tests/structure.py  Wed Dec 10 16:37:18 2014
@@ -4085,6 +4085,31 @@
         self.assertAlmostEqual(cdp.structure.rmsd, 2./3*sqrt(2))
 
 
+    def test_rmsd_molecules(self):
+        """Test the structure.rmsd user function for different molecules in 
one pipe.
+
+        This checks the molecules argument of the U{structure.rmsd user 
function<http://www.nmr-relax.com/manual/structure_rmsd.html>}.
+        """
+
+        # Create three molecules 'X', 'Y', and 'Z' with a some atoms.
+        self.interpreter.structure.add_atom(atom_name='A', res_name='UNK', 
res_num=1, mol_name='X', pos=[1., 0., -1.], element='S')
+        self.interpreter.structure.add_atom(atom_name='A', res_name='UNK', 
res_num=1, mol_name='Y', pos=[0., 0., 0.], element='S')
+        self.interpreter.structure.add_atom(atom_name='A', res_name='UNK', 
res_num=1, mol_name='Z', pos=[-1., 0., 1.], element='S')
+        self.interpreter.structure.add_atom(atom_name='A', res_name='UNK', 
res_num=2, mol_name='X', pos=[1., 2., -1.], element='S')
+        self.interpreter.structure.add_atom(atom_name='A', res_name='UNK', 
res_num=2, mol_name='Y', pos=[0., 2., 0.], element='S')
+        self.interpreter.structure.add_atom(atom_name='A', res_name='UNK', 
res_num=2, mol_name='Z', pos=[-1., 2., 1.], element='S')
+        self.interpreter.structure.add_atom(atom_name='A', res_name='UNK', 
res_num=3, mol_name='X', pos=[1., 20., -1.], element='S')
+        self.interpreter.structure.add_atom(atom_name='A', res_name='UNK', 
res_num=3, mol_name='Y', pos=[0., 20., 0.], element='S')
+        self.interpreter.structure.add_atom(atom_name='A', res_name='UNK', 
res_num=3, mol_name='Z', pos=[-1., 20., 1.], element='S')
+
+        # Calculate the RMSD.
+        self.interpreter.structure.rmsd(molecules=['X', 'Y', 'Z'])
+
+        # Checks.
+        self.assert_(hasattr(cdp.structure, 'rmsd'))
+        self.assertAlmostEqual(cdp.structure.rmsd, 2./3*sqrt(2))
+
+
     def test_rmsd_ubi(self):
         """Test the structure.rmsd user function on the truncated ubiquitin 
ensemble."""
 




Related Messages


Powered by MHonArc, Updated Wed Dec 10 17:20:02 2014