mailr26359 - in /trunk/test_suite/system_tests: n_state_model.py scripts/n_state_model/CaM_IQ_tensor_fit.py


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

Header


Content

Posted by edward on October 22, 2014 - 16:22:
Author: bugman
Date: Wed Oct 22 16:22:26 2014
New Revision: 26359

URL: http://svn.gna.org/viewcvs/relax?rev=26359&view=rev
Log:
Modifications to the new N_state_model.test_CaM_IQ_tensor_fit system test.

The system test now checks all of the optimised values to make sure the 
correct values have been
found.  That will block any future regressions in this N-state model code 
path.  The system test is
now also faster.  And the pcs.structural_noise user function RMSD value has 
been set to 0.0 so that
the test no longer has a random component affecting the final optimised 
values.


Modified:
    trunk/test_suite/system_tests/n_state_model.py
    trunk/test_suite/system_tests/scripts/n_state_model/CaM_IQ_tensor_fit.py

Modified: trunk/test_suite/system_tests/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/n_state_model.py?rev=26359&r1=26358&r2=26359&view=diff
==============================================================================
--- trunk/test_suite/system_tests/n_state_model.py      (original)
+++ trunk/test_suite/system_tests/n_state_model.py      Wed Oct 22 16:22:26 
2014
@@ -166,6 +166,36 @@
 
         # Execute the script.
         self.script_exec(status.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'n_state_model'+sep+'CaM_IQ_tensor_fit.py')
+        self.interpreter.state.save('x', force=True)
+
+        # Check the optimised alignment tensor.
+        ids = ['dy', 'tb', 'tm', 'er', 'yb', 'ho']
+        A = [
+            [      -5.961228899750e-04,        4.522953035367e-06,        
6.168887153854e-04,        7.863257718395e-04,       -2.695142351742e-04],
+            [      -1.383036217378e-04,       -4.939409871651e-04,        
4.130289107370e-04,        7.687580236309e-04,       -3.692016717764e-04],
+            [      -9.960927192978e-05,        4.477678617640e-04,       
-4.062486453226e-04,       -4.332178003608e-04,        3.806525171855e-04],
+            [      -1.703610649220e-05,        2.102104571469e-04,       
-2.836097445400e-04,       -2.989888174606e-04,        1.326155627753e-04],
+            [       6.087542827320e-05,        1.644473726436e-05,       
-1.804561551839e-04,       -1.544765971220e-04,        1.354612889609e-04],
+            [      -1.902819219985e-04,       -1.267359074456e-04,        
2.303672688393e-04,        3.019676781386e-04,       -2.255708108877e-04]
+        ]
+        for i in range(len(A)):
+            print("Checking tensor '%s'." % ids[i])
+            self.assertAlmostEqual(cdp.align_tensors[i].Axx * 1e4, A[i][0] * 
1e4)
+            self.assertAlmostEqual(cdp.align_tensors[i].Ayy * 1e4, A[i][1] * 
1e4)
+            self.assertAlmostEqual(cdp.align_tensors[i].Axy * 1e4, A[i][2] * 
1e4)
+            self.assertAlmostEqual(cdp.align_tensors[i].Axz * 1e4, A[i][3] * 
1e4)
+            self.assertAlmostEqual(cdp.align_tensors[i].Ayz * 1e4, A[i][4] * 
1e4)
+
+        # Check the optimised paramagnetic position.
+        centre = [  6.328315298868965,   8.951353997015001,  
12.311128147383837]
+        self.assertAlmostEqual(cdp.paramagnetic_centre[0], centre[0])
+        self.assertAlmostEqual(cdp.paramagnetic_centre[1], centre[1])
+        self.assertAlmostEqual(cdp.paramagnetic_centre[2], centre[2])
+
+        # Check the minimisation stats.
+        self.assertAlmostEqual(cdp.chi2, 496.36267335850528)
+        self.assertAlmostEqual(cdp.q_rdc, 0.142825408910208)
+        self.assertAlmostEqual(cdp.q_pcs, 0.07265356890310298)
 
 
     def test_absolute_rdc(self):

Modified: 
trunk/test_suite/system_tests/scripts/n_state_model/CaM_IQ_tensor_fit.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/scripts/n_state_model/CaM_IQ_tensor_fit.py?rev=26359&r1=26358&r2=26359&view=diff
==============================================================================
--- trunk/test_suite/system_tests/scripts/n_state_model/CaM_IQ_tensor_fit.py  
  (original)
+++ trunk/test_suite/system_tests/scripts/n_state_model/CaM_IQ_tensor_fit.py  
  Wed Oct 22 16:22:26 2014
@@ -83,7 +83,7 @@
 
 # PCS structural noise.
 print("\n\n# Tensor optimisation with PCS structural noise.\n\n")
-self._execute_uf(uf_name='pcs.structural_noise', rmsd=0.3, sim_num=100, 
file='devnull', force=True)
+self._execute_uf(uf_name='pcs.structural_noise', rmsd=0.0, sim_num=10, 
file='devnull', force=True)
 
 # Optimisation of everything.
 self._execute_uf(uf_name='paramag.centre', fix=False)
@@ -93,7 +93,7 @@
 self._execute_uf(uf_name='monte_carlo.setup', number=3)
 self._execute_uf(uf_name='monte_carlo.create_data')
 self._execute_uf(uf_name='monte_carlo.initial_values')
-self._execute_uf(uf_name='minimise.execute', min_algor='bfgs', 
constraints=False, max_iter=5)
+self._execute_uf(uf_name='minimise.execute', min_algor='bfgs', 
constraints=False, max_iter=2, func_tol=1e-1)
 self._execute_uf(uf_name='monte_carlo.error_analysis')
 
 # Show the tensors.




Related Messages


Powered by MHonArc, Updated Wed Oct 22 16:40:03 2014