mailr11304 - in /1.3/test_suite/system_tests: n_state_model.py scripts/n_state_model/pcs_back_calc.py


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

Header


Content

Posted by edward on July 15, 2010 - 15:46:
Author: bugman
Date: Thu Jul 15 15:46:30 2010
New Revision: 11304

URL: http://svn.gna.org/viewcvs/relax?rev=11304&view=rev
Log:
Added a system test for the back-calculation of PCSs.


Added:
    1.3/test_suite/system_tests/scripts/n_state_model/pcs_back_calc.py
Modified:
    1.3/test_suite/system_tests/n_state_model.py

Modified: 1.3/test_suite/system_tests/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/n_state_model.py?rev=11304&r1=11303&r2=11304&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/n_state_model.py (original)
+++ 1.3/test_suite/system_tests/n_state_model.py Thu Jul 15 15:46:30 2010
@@ -352,6 +352,18 @@
         self.assertAlmostEqual(cdp.q_pcs, 0.0)
 
 
+    def test_pcs_back_calc(self):
+        """Test the back-calculation of PCSs for ubiquitin."""
+
+        # Execute the script.
+        self.interpreter.run(script_file=__main__.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'n_state_model'+sep+'pcs_back_calc.py')
+
+        # Test the optimised values.
+        self.assertAlmostEqual(cdp.mol[0].res[0].spin[0].pcs_bc['A'],  
0.061941887563792014)
+        self.assertAlmostEqual(cdp.mol[0].res[1].spin[0].pcs_bc['A'], 
-0.077886567972081502)
+        self.assertAlmostEqual(cdp.mol[0].res[2].spin[0].pcs_bc['A'], 
-0.13928519099517916)
+
+
     def test_pcs_fit_true_pos(self):
         """Test the fit of DNA PCSs at the true Ln3+ position."""
 

Added: 1.3/test_suite/system_tests/scripts/n_state_model/pcs_back_calc.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/scripts/n_state_model/pcs_back_calc.py?rev=11304&view=auto
==============================================================================
--- 1.3/test_suite/system_tests/scripts/n_state_model/pcs_back_calc.py (added)
+++ 1.3/test_suite/system_tests/scripts/n_state_model/pcs_back_calc.py Thu 
Jul 15 15:46:30 2010
@@ -1,0 +1,42 @@
+# Python module imports.
+import __main__
+from os import sep
+
+# relax imports.
+from physical_constants import NH_BOND_LENGTH_RDC, dipolar_constant, g15N, 
g1H
+
+
+# Path of the files.
+str_path = __main__.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'structures'
+
+# The data pipe.
+pipe.create('pcs_back_calc', 'N-state')
+
+# Load the structures.
+structure.read_pdb('trunc_ubi_pcs.pdb', dir=str_path)
+
+# Load the proton spins.
+structure.load_spins('@H')
+
+# The dipolar constant.
+const = 3.0 / (2.0*pi) * dipolar_constant(g15N, g1H, NH_BOND_LENGTH_RDC)
+
+# The tensor.
+tensor = 'A'
+align_tensor.init(tensor, (4.724/const,  11.856/const, 0, 0, 0), 
param_types=2)
+
+# The temperature.
+temperature(id=tensor, temp=298)
+
+# The frequency.
+frq.set(id=tensor, frq=900.0 * 1e6)
+
+# One state model.
+n_state_model.select_model('fixed')
+n_state_model.number_of_states(N=1)
+
+# Ln3+ position.
+paramag.centre([0, 0, 0])
+
+# Back calc.
+pcs.back_calc(tensor)




Related Messages


Powered by MHonArc, Updated Thu Jul 15 16:00:02 2010