mailr7296 - /1.3/test_suite/system_tests/unit_vectors.py


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

Header


Content

Posted by edward on September 25, 2008 - 16:42:
Author: bugman
Date: Thu Sep 25 16:42:37 2008
New Revision: 7296

URL: http://svn.gna.org/viewcvs/relax?rev=7296&view=rev
Log:
Added another system test for the calculation of unit XH vectors, but with 
spin numbers removed.


Modified:
    1.3/test_suite/system_tests/unit_vectors.py

Modified: 1.3/test_suite/system_tests/unit_vectors.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/unit_vectors.py?rev=7296&r1=7295&r2=7296&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/unit_vectors.py (original)
+++ 1.3/test_suite/system_tests/unit_vectors.py Thu Sep 25 16:42:37 2008
@@ -65,3 +65,29 @@
         self.assertAlmostEqual(cdp.mol[0].res[2].spin[0].xh_vect[0], 
0.40899187)
         self.assertAlmostEqual(cdp.mol[0].res[2].spin[0].xh_vect[1], 
-0.80574458)
         self.assertAlmostEqual(cdp.mol[0].res[2].spin[0].xh_vect[2], 
0.42837054)
+
+
+    def test_calc_unit_vectors2(self):
+        """Load the PDB file and calculate the XH unit vectors from it (with 
spin numbers removed)."""
+
+        # Read the PDB file.
+        
self.relax.interpreter._Structure.read_pdb(file='Ap4Aase_res1-12.pdb', 
dir=sys.path[-1] + '/test_suite/shared_data/structures', model=1)
+
+        # Load the spins.
+        self.relax.interpreter._Structure.load_spins(spin_id='@N')
+        
+        # Remove the spin numbers.
+        self.relax.interpreter._Spin.number()
+
+        # Calculate the unit vectors.
+        self.relax.interpreter._Structure.vectors(attached='H')
+
+        # Alias the current data pipe.
+        cdp = ds[ds.current_pipe]
+
+        # Leu 3.
+        self.assert_(hasattr(cdp.mol[0].res[2].spin[0], 'xh_vect'))
+        self.assertNotEqual(cdp.mol[0].res[2].spin[0].xh_vect, None)
+        self.assertAlmostEqual(cdp.mol[0].res[2].spin[0].xh_vect[0], 
0.40899187)
+        self.assertAlmostEqual(cdp.mol[0].res[2].spin[0].xh_vect[1], 
-0.80574458)
+        self.assertAlmostEqual(cdp.mol[0].res[2].spin[0].xh_vect[2], 
0.42837054)




Related Messages


Powered by MHonArc, Updated Thu Sep 25 17:00:05 2008