Author: bugman Date: Thu Aug 4 19:33:39 2011 New Revision: 14155 URL: http://svn.gna.org/viewcvs/relax?rev=14155&view=rev Log: Re-activated and redesigned the system test of the dauvergne_protocol. Added: branches/gui_testing/test_suite/system_tests/scripts/model_free/dauvergne_protocol.py - copied, changed from r14146, branches/gui_testing/sample_scripts/model_free/dauvergne_protocol.py Modified: branches/gui_testing/test_suite/system_tests/model_free.py Modified: branches/gui_testing/test_suite/system_tests/model_free.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/test_suite/system_tests/model_free.py?rev=14155&r1=14154&r2=14155&view=diff ============================================================================== --- branches/gui_testing/test_suite/system_tests/model_free.py (original) +++ branches/gui_testing/test_suite/system_tests/model_free.py Thu Aug 4 19:33:39 2011 @@ -211,19 +211,14 @@ self.assertEqual(cdp.mol[0].res[1].spin[0].params, ['S2', 'te', 'Rex']) - # FIXME! - def xxx_test_dauvergne_protocol(self): + def test_dauvergne_protocol(self): """Check the execution of auto_analyses.dauvergne_protocol.""" # Create a temporary directory for dumping files. ds.tmpdir = mkdtemp() - # Copy the files into the temporary directory. - path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'relaxation_data'+sep+'13259_bug_reproducing_data' - copytree(path, ds.tmpdir + sep + 'data') - # Execute the script. - self.interpreter.run(script_file=status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'model_free'+sep+'full_analysis_trunc.py') + self.interpreter.run(script_file=status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'model_free'+sep+'dauvergne_protocol.py') def test_generate_ri(self): Copied: branches/gui_testing/test_suite/system_tests/scripts/model_free/dauvergne_protocol.py (from r14146, branches/gui_testing/sample_scripts/model_free/dauvergne_protocol.py) URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/test_suite/system_tests/scripts/model_free/dauvergne_protocol.py?p2=branches/gui_testing/test_suite/system_tests/scripts/model_free/dauvergne_protocol.py&p1=branches/gui_testing/sample_scripts/model_free/dauvergne_protocol.py&r1=14146&r2=14155&rev=14155&view=diff ============================================================================== --- branches/gui_testing/sample_scripts/model_free/dauvergne_protocol.py (original) +++ branches/gui_testing/test_suite/system_tests/scripts/model_free/dauvergne_protocol.py Thu Aug 4 19:33:39 2011 @@ -140,10 +140,13 @@ """ # Python module imports. +from os import sep from time import asctime, localtime # relax module imports. from auto_analyses.dauvergne_protocol import dAuvergne_protocol +from data import Relax_data_store; ds = Relax_data_store() +from status import Status; status = Status() # Analysis variables. @@ -153,17 +156,17 @@ DIFF_MODEL = 'local_tm' # The model-free models. Do not change these unless absolutely necessary, the protocol is likely to fail if these are changed. -MF_MODELS = ['m0', 'm1', 'm2', 'm3', 'm4', 'm5', 'm6', 'm7', 'm8', 'm9'] -LOCAL_TM_MODELS = ['tm0', 'tm1', 'tm2', 'tm3', 'tm4', 'tm5', 'tm6', 'tm7', 'tm8', 'tm9'] +MF_MODELS = ['m1', 'm2'] +LOCAL_TM_MODELS = ['tm0', 'tm1'] # The grid search size (the number of increments per dimension). -GRID_INC = 11 +GRID_INC = 3 # The optimisation technique. MIN_ALGOR = 'newton' # The number of Monte Carlo simulations to be used for error analysis at the end of the analysis. -MC_NUM = 500 +MC_NUM = 2 # Automatic looping over all rounds until convergence (must be a boolean value of True or False). CONV_LOOP = True @@ -179,27 +182,26 @@ name = "mf (%s)" % asctime(localtime()) pipe.create(name, 'mf') +# The data path. +data_path = status.install_path + sep + 'test_suite' + sep + 'shared_data' + sep + 'model_free' + sep + 'sphere' + sep + # Load the sequence. -sequence.read(file='noe.500.out', dir=None, mol_name_col=None, res_num_col=1, res_name_col=2, spin_num_col=None, spin_name_col=None) +sequence.read(file='noe.500.out', dir=data_path, mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5) # Name the spins. spin.name(name='N') # Load the PDB file. -structure.read_pdb('1f3y.pdb') +structure.read_pdb('sphere.pdb', dir=data_path) structure.vectors(attached='H') # Load the relaxation data. -relax_data.read(ri_id='R1_600', ri_type='R1', frq=599.719*1e6, file='r1.600.out', mol_name_col=None, res_num_col=1, res_name_col=2, spin_num_col=None, spin_name_col=None, data_col=3, error_col=4) -relax_data.read(ri_id='R2_600', ri_type='R2', frq=599.719*1e6, file='r2.600.out', mol_name_col=None, res_num_col=1, res_name_col=2, spin_num_col=None, spin_name_col=None, data_col=3, error_col=4) -relax_data.read(ri_id='NOE_600', ri_type='NOE', frq=599.719*1e6, file='noe.600.out', mol_name_col=None, res_num_col=1, res_name_col=2, spin_num_col=None, spin_name_col=None, data_col=3, error_col=4) -relax_data.read(ri_id='R1_500', ri_type='R1', frq=500.208*1e6, file='r1.500.out', mol_name_col=None, res_num_col=1, res_name_col=2, spin_num_col=None, spin_name_col=None, data_col=3, error_col=4) -relax_data.read(ri_id='R2_500', ri_type='R2', frq=500.208*1e6, file='r2.500.out', mol_name_col=None, res_num_col=1, res_name_col=2, spin_num_col=None, spin_name_col=None, data_col=3, error_col=4) -relax_data.read(ri_id='NOE_500', ri_type='NOE', frq=500.208*1e6, file='noe.500.out', mol_name_col=None, res_num_col=1, res_name_col=2, spin_num_col=None, spin_name_col=None, data_col=3, error_col=4) - -# Deselect spins to be excluded (including unresolved and specifically excluded spins). -deselect.read(file='unresolved', dir=None, spin_id_col=None, mol_name_col=None, res_num_col=1, res_name_col=None, spin_num_col=None, spin_name_col=None, sep=None, spin_id=None, boolean='AND', change_all=False) -deselect.read(file='exclude', spin_id_col=1) +relax_data.read(ri_id='R1_900', ri_type='R1', frq=900*1e6, file='r1.900.out', 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) +relax_data.read(ri_id='R2_900', ri_type='R2', frq=900*1e6, file='r2.900.out', 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) +relax_data.read(ri_id='NOE_900', ri_type='NOE', frq=900*1e6, file='noe.900.out', 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) +relax_data.read(ri_id='R1_500', ri_type='R1', frq=500*1e6, file='r1.500.out', 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) +relax_data.read(ri_id='R2_500', ri_type='R2', frq=500*1e6, file='r2.500.out', 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) +relax_data.read(ri_id='NOE_500', ri_type='NOE', frq=500*1e6, file='noe.500.out', 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) # Set the bond length, CSA values, heteronucleus type, and proton type. value.set(1.02 * 1e-10, 'bond_length') @@ -212,5 +214,5 @@ # Execution. ############ -# Do not change! -dAuvergne_protocol(pipe_name=name, diff_model=DIFF_MODEL, mf_models=MF_MODELS, local_tm_models=LOCAL_TM_MODELS, grid_inc=GRID_INC, min_algor=MIN_ALGOR, mc_num=MC_NUM, conv_loop=CONV_LOOP) +for global_model in ['local_tm', 'sphere', 'prolate', 'oblate', 'ellipsoid', 'final']: + dAuvergne_protocol(pipe_name=name, results_dir=ds.tmpdir, diff_model=global_model, mf_models=MF_MODELS, local_tm_models=LOCAL_TM_MODELS, grid_inc=GRID_INC, min_algor=MIN_ALGOR, mc_sim_num=MC_NUM, conv_loop=CONV_LOOP)