mailr17098 - in /branches/interatomic/test_suite/system_tests: n_state_model.py scripts/n_state_model/monte_carlo_testing.py


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

Header


Content

Posted by edward on June 28, 2012 - 15:58:
Author: bugman
Date: Thu Jun 28 15:57:59 2012
New Revision: 17098

URL: http://svn.gna.org/viewcvs/relax?rev=17098&view=rev
Log:
Fixes for the N_state_model.test_monte_carlo_sims system test for the 
interatomic data design.


Modified:
    branches/interatomic/test_suite/system_tests/n_state_model.py
    
branches/interatomic/test_suite/system_tests/scripts/n_state_model/monte_carlo_testing.py

Modified: branches/interatomic/test_suite/system_tests/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/interatomic/test_suite/system_tests/n_state_model.py?rev=17098&r1=17097&r2=17098&view=diff
==============================================================================
--- branches/interatomic/test_suite/system_tests/n_state_model.py (original)
+++ branches/interatomic/test_suite/system_tests/n_state_model.py Thu Jun 28 
15:57:59 2012
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2008-2011 Edward d'Auvergne                                  
 #
+# Copyright (C) 2008-2012 Edward d'Auvergne                                  
 #
 #                                                                            
 #
 # This file is part of the program relax.                                    
 #
 #                                                                            
 #
@@ -31,6 +31,7 @@
 from base_classes import SystemTestCase
 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
 from generic_fns.mol_res_spin import return_spin, spin_loop
 from status import Status; status = Status()
 
@@ -445,17 +446,25 @@
             print(spin)
 
             # Check for simulation data.
-            if spin.name == 'N':
-                self.assert_(hasattr(spin, 'rdc_sim'))
-                self.assert_(spin.rdc_sim.has_key(key))
             self.assert_(hasattr(spin, 'pcs_sim'))
             self.assert_(spin.pcs_sim.has_key(key))
 
             # Check the values of the simulated data.
             for i in range(cdp.sim_number):
-                if spin.name == 'N':
-                    self.assertAlmostEqual(spin.rdc[key], 
spin.rdc_sim[key][i], 5)
                 self.assertAlmostEqual(spin.pcs[key], spin.pcs_sim[key][i])
+
+        # The interatomic data.
+        for interatom in interatomic_loop():
+            # Print out.
+            print(interatom)
+
+            # Check for simulation data.
+            self.assert_(hasattr(interatom, 'rdc_sim'))
+            self.assert_(interatom.rdc_sim.has_key(key))
+
+            # Check the values of the simulated data.
+            for i in range(cdp.sim_number):
+                self.assertAlmostEqual(interatom.rdc[key], 
interatom.rdc_sim[key][i], 5)
 
         # Test the optimised simluation values.
         for i in range(cdp.sim_number):

Modified: 
branches/interatomic/test_suite/system_tests/scripts/n_state_model/monte_carlo_testing.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/interatomic/test_suite/system_tests/scripts/n_state_model/monte_carlo_testing.py?rev=17098&r1=17097&r2=17098&view=diff
==============================================================================
--- 
branches/interatomic/test_suite/system_tests/scripts/n_state_model/monte_carlo_testing.py
 (original)
+++ 
branches/interatomic/test_suite/system_tests/scripts/n_state_model/monte_carlo_testing.py
 Thu Jun 28 15:57:59 2012
@@ -33,7 +33,7 @@
 self._execute_uf(uf_name='spin.isotope', isotope='1H', spin_id='@H')
 
 # RDCs.
-self._execute_uf(uf_name='rdc.read', align_id='synth', file='synth_rdc', 
dir=DATA_PATH, spin_id1_col=1, spin_id1_col=2, data_col=3, error_col=4)
+self._execute_uf(uf_name='rdc.read', align_id='synth', file='synth_rdc', 
dir=DATA_PATH, spin_id1_col=1, spin_id2_col=2, data_col=3, error_col=4)
 
 # PCSs.
 self._execute_uf(uf_name='pcs.read', align_id='synth', file='synth_pcs', 
dir=DATA_PATH, mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, 
spin_name_col=5, data_col=6, error_col=7)




Related Messages


Powered by MHonArc, Updated Thu Jun 28 16:20:02 2012