mailr17982 - /trunk/test_suite/system_tests/n_state_model.py


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

Header


Content

Posted by edward on November 15, 2012 - 09:27:
Author: bugman
Date: Thu Nov 15 09:27:40 2012
New Revision: 17982

URL: http://svn.gna.org/viewcvs/relax?rev=17982&view=rev
Log:
The N_state_model.test_data_copying system test now checks the spin RDC and 
PCS data.


Modified:
    trunk/test_suite/system_tests/n_state_model.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=17982&r1=17981&r2=17982&view=diff
==============================================================================
--- trunk/test_suite/system_tests/n_state_model.py (original)
+++ trunk/test_suite/system_tests/n_state_model.py Thu Nov 15 09:27:40 2012
@@ -30,7 +30,7 @@
 from data import Relax_data_store; ds = Relax_data_store()
 from generic_fns.align_tensor import calc_chi_tensor
 from generic_fns.interatomic import interatomic_loop, return_interatom
-from generic_fns.mol_res_spin import return_spin, spin_loop
+from generic_fns.mol_res_spin import return_spin, spin_index_loop, spin_loop
 from generic_fns.pipes import get_pipe
 from status import Status; status = Status()
 from test_suite.system_tests.base_classes import SystemTestCase
@@ -395,6 +395,32 @@
         self.assertEqual(orig.pcs_ids, new.pcs_ids)
         self.assertEqual(orig.align_ids, new.align_ids)
 
+        # Check the spin data.
+        for mol_index, res_index, spin_index in spin_index_loop():
+            # Alias the spin containers.
+            spin_orig = orig.mol[mol_index].res[res_index].spin[spin_index]
+            spin_new = new.mol[mol_index].res[res_index].spin[spin_index]
+
+            # Loop over the alignments.
+            for id in orig.align_ids:
+                # RDC checks.
+                if hasattr(spin_orig, 'rdc'):
+                    # Check the keys.
+                    self.assertEqual(spin_orig.rdc.keys(), 
spin_new.rdc.keys())
+
+                    # Check the values.
+                    if id in spin_orig.rdc:
+                        self.assertEqual(spin_orig.rdc[id], spin_new.rdc[id])
+
+                # PCS checks.
+                if hasattr(spin_orig, 'pcs'):
+                    # Check the keys.
+                    self.assertEqual(spin_orig.pcs.keys(), 
spin_new.pcs.keys())
+
+                    # Check the values.
+                    if id in spin_orig.pcs:
+                        self.assertEqual(spin_orig.pcs[id], spin_new.pcs[id])
+
 
     def test_lactose_n_state_fixed(self):
         """The 4-state model analysis of lactose using RDCs and PCSs."""




Related Messages


Powered by MHonArc, Updated Thu Nov 15 09:40:02 2012