Author: bugman Date: Mon Mar 11 14:19:58 2013 New Revision: 18770 URL: http://svn.gna.org/viewcvs/relax?rev=18770&view=rev Log: Updated the rigid_test.py frame order system test script so that it can run as a GUI test. The self._execute_uf() method needs to be used to call user function. This was causing 8 GUI test failures. Modified: branches/frame_order_testing/test_suite/system_tests/scripts/frame_order/rigid_test.py Modified: branches/frame_order_testing/test_suite/system_tests/scripts/frame_order/rigid_test.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/test_suite/system_tests/scripts/frame_order/rigid_test.py?rev=18770&r1=18769&r2=18770&view=diff ============================================================================== --- branches/frame_order_testing/test_suite/system_tests/scripts/frame_order/rigid_test.py (original) +++ branches/frame_order_testing/test_suite/system_tests/scripts/frame_order/rigid_test.py Mon Mar 11 14:19:58 2013 @@ -40,20 +40,20 @@ # Create the data pipe. -pipe.create(pipe_name='rigid test', pipe_type='frame order') +self._execute_uf(uf_name='pipe.create', pipe_name='rigid test', pipe_type='frame order') # Read the structures. -structure.read_pdb('displaced.pdb', dir=PATH, set_mol_name='fancy_mol') +self._execute_uf(uf_name='structure.read_pdb', file='displaced.pdb', dir=PATH, set_mol_name='fancy_mol') # Set up the 15N and 1H spins. -structure.load_spins() -spin.isotope(isotope='15N', spin_id='@N') -spin.isotope(isotope='1H', spin_id='@H') +self._execute_uf(uf_name='structure.load_spins') +self._execute_uf(uf_name='spin.isotope', isotope='15N', spin_id='@N') +self._execute_uf(uf_name='spin.isotope', isotope='1H', spin_id='@H') # Define the magnetic dipole-dipole relaxation interaction. -dipole_pair.define(spin_id1='@N', spin_id2='@H', direct_bond=True) -dipole_pair.set_dist(spin_id1='@N', spin_id2='@H', ave_dist=1.041 * 1e-10) -dipole_pair.unit_vectors() +self._execute_uf(uf_name='dipole_pair.define', spin_id1='@N', spin_id2='@H', direct_bond=True) +self._execute_uf(uf_name='dipole_pair.set_dist', spin_id1='@N', spin_id2='@H', ave_dist=1.041 * 1e-10) +self._execute_uf(uf_name='dipole_pair.unit_vectors') # The lanthanides and data files. ln = ['dy', 'tb', 'tm', 'er', 'yb', 'ho'] @@ -77,65 +77,65 @@ # Loop over the alignments. for i in range(len(ln)): # Load the RDCs. - rdc.read(align_id=ln[i], file=rdc_files[i], dir=PATH, spin_id1_col=1, spin_id2_col=2, data_col=3, error_col=4) + self._execute_uf(uf_name='rdc.read', align_id=ln[i], file=rdc_files[i], dir=PATH, spin_id1_col=1, spin_id2_col=2, data_col=3, error_col=4) # The PCS (only a subset of ~5 spins for fast initial optimisations). - pcs.read(align_id=ln[i], file=pcs_files[i], dir=PATH, mol_name_col=1, res_num_col=2, spin_name_col=5, data_col=6, error_col=7) + self._execute_uf(uf_name='pcs.read', align_id=ln[i], file=pcs_files[i], dir=PATH, mol_name_col=1, res_num_col=2, spin_name_col=5, data_col=6, error_col=7) # The temperature and field strength. - temperature(id=ln[i], temp=303.0) - frq.set(id=ln[i], frq=800.0, units="MHz") + self._execute_uf(uf_name='temperature', id=ln[i], temp=303.0) + self._execute_uf(uf_name='frq.set', id=ln[i], frq=800.0, units="MHz") # Load the tensors (the full tensors). -align_tensor.init(tensor='Dy fixed', align_id='dy', params=(-0.000283041921495, 0.00017331020651, 0.000348144461756, 0.00109678563394, -0.000261126459214), param_types=2) -align_tensor.init(tensor='Dy fixed', align_id='dy', params=(1.32405973595e-05, 1.69451339335e-05, 1.11420056339e-05, 1.2902359091e-05, 1.06231229491e-05), param_types=2, errors=True) -align_tensor.init(tensor='Tb fixed', align_id='tb', params=(0.000167738428636, -0.000311103377008, 0.000231043994111, 0.000927908442481, -0.00042448381621), param_types=2) -align_tensor.init(tensor='Tb fixed', align_id='tb', params=(9.23106516114e-06, 1.23864406564e-05, 9.25138110416e-06, 1.0025121852e-05, 8.6027985631e-06), param_types=2, errors=True) -align_tensor.init(tensor='Tm fixed', align_id='tm', params=(-0.000214531334757, 0.000250016686133, -0.000318452894707, -0.000566585709341, 0.000458689017372), param_types=2) -align_tensor.init(tensor='Tm fixed', align_id='tm', params=(8.18656207912e-06, 1.09649975373e-05, 8.43998269558e-06, 8.63599444168e-06, 7.95937745247e-06), param_types=2, errors=True) -align_tensor.init(tensor='Er fixed', align_id='er', params=(-9.34632913359e-05, 7.71986454118e-05, -0.000234020357448, -0.000363596427557, 0.000177874820425), param_types=2) -align_tensor.init(tensor='Er fixed', align_id='er', params=(6.32851257036e-06, 9.3721066722e-06, 7.36682050165e-06, 7.52806731357e-06, 9.79003188793e-06), param_types=2, errors=True) -align_tensor.init(tensor='Yb fixed', align_id='yb', params=(2.20524016343e-05, -6.04903356962e-05, -0.000114723702615, -0.000214855846027, 0.000143730520814), param_types=2) -align_tensor.init(tensor='Yb fixed', align_id='yb', params=(4.2812326053e-06, 5.43186247053e-06, 4.83605375312e-06, 5.10468453851e-06, 4.31847329676e-06), param_types=2, errors=True) -align_tensor.init(tensor='Ho fixed', align_id='ho', params=(-6.99147985047e-05, -8.00899711508e-06, 0.000102219102441, 0.000424559081645, -0.000255281322523), param_types=2) -align_tensor.init(tensor='Ho fixed', align_id='ho', params=(7.74711876341e-06, 9.55677606858e-06, 9.13852550558e-06, 7.82230105216e-06, 7.33515152376e-06), param_types=2, errors=True) +self._execute_uf(uf_name='align_tensor.init', tensor='Dy fixed', align_id='dy', params=(-0.000283041921495, 0.00017331020651, 0.000348144461756, 0.00109678563394, -0.000261126459214), param_types=2) +self._execute_uf(uf_name='align_tensor.init', tensor='Dy fixed', align_id='dy', params=(1.32405973595e-05, 1.69451339335e-05, 1.11420056339e-05, 1.2902359091e-05, 1.06231229491e-05), param_types=2, errors=True) +self._execute_uf(uf_name='align_tensor.init', tensor='Tb fixed', align_id='tb', params=(0.000167738428636, -0.000311103377008, 0.000231043994111, 0.000927908442481, -0.00042448381621), param_types=2) +self._execute_uf(uf_name='align_tensor.init', tensor='Tb fixed', align_id='tb', params=(9.23106516114e-06, 1.23864406564e-05, 9.25138110416e-06, 1.0025121852e-05, 8.6027985631e-06), param_types=2, errors=True) +self._execute_uf(uf_name='align_tensor.init', tensor='Tm fixed', align_id='tm', params=(-0.000214531334757, 0.000250016686133, -0.000318452894707, -0.000566585709341, 0.000458689017372), param_types=2) +self._execute_uf(uf_name='align_tensor.init', tensor='Tm fixed', align_id='tm', params=(8.18656207912e-06, 1.09649975373e-05, 8.43998269558e-06, 8.63599444168e-06, 7.95937745247e-06), param_types=2, errors=True) +self._execute_uf(uf_name='align_tensor.init', tensor='Er fixed', align_id='er', params=(-9.34632913359e-05, 7.71986454118e-05, -0.000234020357448, -0.000363596427557, 0.000177874820425), param_types=2) +self._execute_uf(uf_name='align_tensor.init', tensor='Er fixed', align_id='er', params=(6.32851257036e-06, 9.3721066722e-06, 7.36682050165e-06, 7.52806731357e-06, 9.79003188793e-06), param_types=2, errors=True) +self._execute_uf(uf_name='align_tensor.init', tensor='Yb fixed', align_id='yb', params=(2.20524016343e-05, -6.04903356962e-05, -0.000114723702615, -0.000214855846027, 0.000143730520814), param_types=2) +self._execute_uf(uf_name='align_tensor.init', tensor='Yb fixed', align_id='yb', params=(4.2812326053e-06, 5.43186247053e-06, 4.83605375312e-06, 5.10468453851e-06, 4.31847329676e-06), param_types=2, errors=True) +self._execute_uf(uf_name='align_tensor.init', tensor='Ho fixed', align_id='ho', params=(-6.99147985047e-05, -8.00899711508e-06, 0.000102219102441, 0.000424559081645, -0.000255281322523), param_types=2) +self._execute_uf(uf_name='align_tensor.init', tensor='Ho fixed', align_id='ho', params=(7.74711876341e-06, 9.55677606858e-06, 9.13852550558e-06, 7.82230105216e-06, 7.33515152376e-06), param_types=2, errors=True) # Define the domains. -domain(id='moving', spin_id=":0-100") -domain(id='fixed', spin_id=":101-200") +self._execute_uf(uf_name='domain', id='moving', spin_id=":0-100") +self._execute_uf(uf_name='domain', id='fixed', spin_id=":101-200") # The tensor domains and reductions. full = ['Dy fixed', 'Tb fixed', 'Tm fixed', 'Er fixed', 'Yb fixed', 'Ho fixed'] red = ['Dy moving', 'Tb moving', 'Tm moving', 'Er moving', 'Yb moving', 'Ho moving'] for i in range(len(full)): # Initialise the reduced tensors (fitted during optimisation). - align_tensor.init(tensor=red[i], align_id=ln[i], params=(0, 0, 0, 0, 0)) + self._execute_uf(uf_name='align_tensor.init', tensor=red[i], align_id=ln[i], params=(0, 0, 0, 0, 0)) # Set the domain info. - align_tensor.set_domain(tensor=full[i], domain='fixed') - align_tensor.set_domain(tensor=red[i], domain='moving') + self._execute_uf(uf_name='align_tensor.set_domain', tensor=full[i], domain='fixed') + self._execute_uf(uf_name='align_tensor.set_domain', tensor=red[i], domain='moving') # Specify which tensor is reduced. - align_tensor.reduction(full_tensor=full[i], red_tensor=red[i]) + self._execute_uf(uf_name='align_tensor.reduction', full_tensor=full[i], red_tensor=red[i]) # Set the reference domain. -frame_order.ref_domain('fixed') +self._execute_uf(uf_name='frame_order.ref_domain', ref='fixed') # Link the domains to the PDB files. -frame_order.domain_to_pdb(domain='fixed', pdb='displaced.pdb') +self._execute_uf(uf_name='frame_order.domain_to_pdb', domain='fixed', pdb='displaced.pdb') # Set up the mechanics of the displacement to the average domain position. -frame_order.average_position(pivot='com', translation=True) +self._execute_uf(uf_name='frame_order.average_position', pivot='com', translation=True) # Set the initial pivot point (should make no difference for the rigid model). pivot = array([0, 0, 0], float64) -frame_order.pivot(pivot, fix=True) +self._execute_uf(uf_name='frame_order.pivot', pivot=pivot, fix=True) # Set the paramagnetic centre position. -paramag.centre(pos=[-5, -7, -9]) +self._execute_uf(uf_name='paramag.centre', pos=[-5, -7, -9]) # Set the number of integration points. -frame_order.num_int_pts(10000) +self._execute_uf(uf_name='frame_order.num_int_pts', num=10000) # Set the real parameter values (the inverted displacement values). cdp.ave_pos_x = -1 @@ -157,7 +157,7 @@ ds.model = 'rigid' # Select the Frame Order model. -frame_order.select_model(model=ds.model) +self._execute_uf(uf_name='frame_order.select_model', model=ds.model) # Calculate the chi2 value. -calc() +self._execute_uf(uf_name='calc')