mailr18134 - in /branches/frame_order_testing: ./ generic_fns/ specific_fns/ test_suite/shared_data/align_data/paramagnetic/ tes...


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

Header


Content

Posted by edward on December 13, 2012 - 17:59:
Author: bugman
Date: Thu Dec 13 17:59:58 2012
New Revision: 18134

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

........
  r18126 | bugman | 2012-12-12 15:54:59 +0100 (Wed, 12 Dec 2012) | 5 lines
  
  Created some synthetic paramagnetically aligned RDC and PCS data to the 
test suite.
  
  This will be used in later system tests.
........
  r18127 | bugman | 2012-12-12 16:51:29 +0100 (Wed, 12 Dec 2012) | 3 lines
  
  NH bond length fix for the synthetic data committed at r18126.
........
  r18128 | bugman | 2012-12-12 16:59:42 +0100 (Wed, 12 Dec 2012) | 5 lines
  
  Changed the molecule name to remove a space.
  
  This is for the synthetic paramagnetic data in the test suite.
........
  r18129 | bugman | 2012-12-12 17:02:13 +0100 (Wed, 12 Dec 2012) | 3 lines
  
  Removed quotation marks from the molecule name in the PCS files of the 
synthetic alignment test data.
........
  r18130 | bugman | 2012-12-13 15:52:23 +0100 (Thu, 13 Dec 2012) | 6 lines
  
  Bug fix for the N-state model with PCSs and the temperature or spectrometer 
frequency are not set.
  
  Previously the missing value was set to 0 K or 1e-10 Hz, but this was 
causing optimisation to fail.
  Now a RelaxError is produced if the value is missing and optimisation is 
attempted.
........
  r18131 | bugman | 2012-12-13 15:53:40 +0100 (Thu, 13 Dec 2012) | 5 lines
  
  Fixes for the PCS values of the paramagnetic alignment test suite data.
  
  The data generation script output and results file have been added to the 
repository as well.
........
  r18132 | bugman | 2012-12-13 17:29:39 +0100 (Thu, 13 Dec 2012) | 6 lines
  
  Fixes for the calculation of RDC and PCS Q factors for when fixed alignment 
tensors are present.
  
  If a tensor is fixed, then there will be no back-calculated data.  
Therefore instead of returning
  from the function, a continue statement is used to skip just that alignment.
........
  r18133 | bugman | 2012-12-13 17:47:10 +0100 (Thu, 13 Dec 2012) | 7 lines
  
  Created the N_state_model.test_paramag_align_fit system test to check the 
paramagnetic data.
  
  This test check the alignment tensor optimisation of the RDC and PCS data in
  test_suite/shared_data/align_data/paramagnetic/, loading both alignment 
data sets but only
  optimising one tensor.
........

Added:
    
branches/frame_order_testing/test_suite/shared_data/align_data/paramagnetic/
      - copied from r18133, 
trunk/test_suite/shared_data/align_data/paramagnetic/
    
branches/frame_order_testing/test_suite/system_tests/scripts/n_state_model/paramag_align_fit.py
      - copied unchanged from r18133, 
trunk/test_suite/system_tests/scripts/n_state_model/paramag_align_fit.py
Modified:
    branches/frame_order_testing/   (props changed)
    branches/frame_order_testing/generic_fns/pcs.py
    branches/frame_order_testing/generic_fns/rdc.py
    branches/frame_order_testing/specific_fns/n_state_model.py
    branches/frame_order_testing/test_suite/system_tests/n_state_model.py

Propchange: branches/frame_order_testing/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Dec 13 17:59:58 2012
@@ -1,1 +1,1 @@
-/trunk:1-18124
+/trunk:1-18133

Modified: branches/frame_order_testing/generic_fns/pcs.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/generic_fns/pcs.py?rev=18134&r1=18133&r2=18134&view=diff
==============================================================================
--- branches/frame_order_testing/generic_fns/pcs.py (original)
+++ branches/frame_order_testing/generic_fns/pcs.py Thu Dec 13 17:59:58 2012
@@ -523,11 +523,11 @@
             warn(RelaxWarning("No spins have been used in the calculation."))
             return
         if not pcs_data:
-            warn(RelaxWarning("No PCS data can be found."))
-            return
+            warn(RelaxWarning("No PCS data can be found for the alignment ID 
'%s'." % align_id))
+            continue
         if not pcs_bc_data:
-            warn(RelaxWarning("No back-calculated PCS data can be found."))
-            return
+            warn(RelaxWarning("No back-calculated PCS data can be found for 
the alignment ID '%s'." % align_id))
+            continue
 
     # The total Q-factor.
     cdp.q_pcs = 0.0

Modified: branches/frame_order_testing/generic_fns/rdc.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/generic_fns/rdc.py?rev=18134&r1=18133&r2=18134&view=diff
==============================================================================
--- branches/frame_order_testing/generic_fns/rdc.py (original)
+++ branches/frame_order_testing/generic_fns/rdc.py Thu Dec 13 17:59:58 2012
@@ -465,11 +465,11 @@
             warn(RelaxWarning("No interatomic data containers have been used 
in the calculation."))
             return
         if not rdc_data:
-            warn(RelaxWarning("No RDC data can be found."))
-            return
+            warn(RelaxWarning("No RDC data can be found for the alignment ID 
'%s'." % align_id))
+            continue
         if not rdc_bc_data:
-            warn(RelaxWarning("No back-calculated RDC data can be found."))
-            return
+            warn(RelaxWarning("No back-calculated RDC data can be found for 
the alignment ID '%s'." % align_id))
+            continue
 
         # Normalisation factor of 2Da^2(4 + 3R)/5.
         if norm2_flag:

Modified: branches/frame_order_testing/specific_fns/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/specific_fns/n_state_model.py?rev=18134&r1=18133&r2=18134&view=diff
==============================================================================
--- branches/frame_order_testing/specific_fns/n_state_model.py (original)
+++ branches/frame_order_testing/specific_fns/n_state_model.py Thu Dec 13 
17:59:58 2012
@@ -934,14 +934,18 @@
             # Get the temperature for the PCS constant.
             if align_id in cdp.temperature:
                 temp.append(cdp.temperature[align_id])
+
+            # The temperature must be given!
             else:
-                temp.append(0.0)
+                raise RelaxError("The experimental temperature for the 
alignment ID '%s' has not been set." % align_id)
 
             # Get the spectrometer frequency in Tesla units for the PCS 
constant.
             if align_id in cdp.frq:
                 frq.append(cdp.frq[align_id] * 2.0 * pi / g1H)
+
+            # The frequency must be given!
             else:
-                frq.append(1e-10)
+                raise RelaxError("The spectrometer frequency for the 
alignment ID '%s' has not been set." % align_id)
 
             # Spin loop.
             j = 0

Modified: 
branches/frame_order_testing/test_suite/system_tests/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/test_suite/system_tests/n_state_model.py?rev=18134&r1=18133&r2=18134&view=diff
==============================================================================
--- branches/frame_order_testing/test_suite/system_tests/n_state_model.py 
(original)
+++ branches/frame_order_testing/test_suite/system_tests/n_state_model.py Thu 
Dec 13 17:59:58 2012
@@ -580,6 +580,25 @@
         self.assertAlmostEqual(cdp.align_tensors[0].Ayz_err, 0.0)
 
 
+    def test_paramag_align_fit(self):
+        """Test the use of RDCs and PCSs to find the alignment tensor."""
+
+        # Execute the script.
+        self.script_exec(status.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'n_state_model'+sep+'paramag_align_fit.py')
+
+        # Test the optimised values.
+        self.assertAlmostEqual(cdp.align_tensors[1].Axx,  0.001414718232784)
+        self.assertAlmostEqual(cdp.align_tensors[1].Ayy,  0.001530457843766)
+        self.assertAlmostEqual(cdp.align_tensors[1].Axy,  0.001689957281873)
+        self.assertAlmostEqual(cdp.align_tensors[1].Axz,  0.000838692329704)
+        self.assertAlmostEqual(cdp.align_tensors[1].Ayz, -0.000984302159683)
+        self.assertAlmostEqual(cdp.q_factors_rdc['Er'], 0.0, 7)
+        self.assertAlmostEqual(cdp.q_factors_rdc_norm2['Er'], 0.0, 7)
+        self.assertAlmostEqual(cdp.q_factors_pcs['Er'], 0.0, 7)
+        self.assertAlmostEqual(cdp.q_rdc, 0.0, 7)
+        self.assertAlmostEqual(cdp.q_pcs, 0.0, 7)
+
+
     def test_paramag_centre_fit(self):
         """Test the use of RDCs and PCSs to find the alignment tensor."""
 




Related Messages


Powered by MHonArc, Updated Thu Dec 13 19:20:01 2012