Author: bugman Date: Thu Oct 6 14:52:44 2011 New Revision: 14806 URL: http://svn.gna.org/viewcvs/relax?rev=14806&view=rev Log: Created the N-state model test_rdc_tensor() system test for catching a strange RDC back calc bug. Added: 1.3/test_suite/shared_data/align_data/CaM/rdc_dy 1.3/test_suite/system_tests/scripts/n_state_model/rdc_tensor.py Modified: 1.3/test_suite/system_tests/n_state_model.py Added: 1.3/test_suite/shared_data/align_data/CaM/rdc_dy URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/shared_data/align_data/CaM/rdc_dy?rev=14806&view=auto ============================================================================== --- 1.3/test_suite/shared_data/align_data/CaM/rdc_dy (added) +++ 1.3/test_suite/shared_data/align_data/CaM/rdc_dy Thu Oct 6 14:52:44 2011 @@ -1,0 +1,16 @@ +# res_num spin_name rdc error + 4 N -6.41 1.0 + 5 N -21.55 1.0 + 7 N 8.25 1.0 + 12 N -9.12 1.0 + 33 N -30.02 1.0 + 35 N -37.07 1.0 + 45 N 3.33 1.0 + 46 N -2.04 1.0 + 79 N -2.33 1.0 + 80 N -3.61 1.0 + 82 N -5.77 1.0 + 87 N -32.93 1.0 + 88 N -13.49 1.0 + 96 N 12.33 1.0 + 101 N 21.21 1.0 Modified: 1.3/test_suite/system_tests/n_state_model.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/n_state_model.py?rev=14806&r1=14805&r2=14806&view=diff ============================================================================== --- 1.3/test_suite/system_tests/n_state_model.py (original) +++ 1.3/test_suite/system_tests/n_state_model.py Thu Oct 6 14:52:44 2011 @@ -480,6 +480,13 @@ self.assertAlmostEqual(cdp.mol[0].res[2].spin[0].rdc_bc['A'], -16.244078605100817) + def test_rdc_tensor(self): + """Test the calculation of an alignment tensor from RDC data.""" + + # Execute the script. + self.interpreter.run(script_file=status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'n_state_model'+sep+'rdc_tensor.py') + + def test_stereochem_analysis(self): """The full relative stereochemistry analysis.""" Added: 1.3/test_suite/system_tests/scripts/n_state_model/rdc_tensor.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/scripts/n_state_model/rdc_tensor.py?rev=14806&view=auto ============================================================================== --- 1.3/test_suite/system_tests/scripts/n_state_model/rdc_tensor.py (added) +++ 1.3/test_suite/system_tests/scripts/n_state_model/rdc_tensor.py Thu Oct 6 14:52:44 2011 @@ -1,0 +1,64 @@ +# Python module imports. +from os import sep + +# relax module imports. +from physical_constants import NH_BOND_LENGTH_RDC +from status import Status; status = Status() + + +# Path of the alignment data and structure. +DATA_PATH = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'align_data'+sep+'CaM' +STRUCT_PATH = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'structures' + +# The tag. +tag = "Dy C-dom" + +# Create the data pipe. +pipe.create(tag, 'N-state') + +# Load the CaM structures. +structure.read_pdb('bax_C_1J7P_N_H_Ca.pdb', dir=STRUCT_PATH) + +# Load the spins. +structure.load_spins('@N', ave_pos=False) +structure.load_spins('@H', ave_pos=False) + +# Load the NH vectors. +structure.vectors('H', '@N', ave=False) + +# Set the values needed to calculate the dipolar constant. +value.set(NH_BOND_LENGTH_RDC, 'bond_length') +value.set('15N', 'heteronucleus') +value.set('1H', 'proton') + +# RDCs. +rdc.read(tag, file='rdc_dy', dir=DATA_PATH, res_num_col=1, spin_name_col=2, data_col=3, error_col=4, neg_g_corr=True) + +# Set up the model. +n_state_model.select_model('fixed') + +# Minimisation. +grid_search(inc=3) +minimise('newton', constraints=False) + +# Monte Carlo simulations. +monte_carlo.setup(number=3) +monte_carlo.create_data() +monte_carlo.initial_values() +minimise('newton', constraints=False) +monte_carlo.error_analysis() + +# Show the tensors. +align_tensor.display(tag) + +# Back calc. +rdc.back_calc() + +# Q-factors. +rdc.calc_q_factors() + +# Correlation plots. +rdc.corr_plot(file="%s_rdc_corr.agr" % 'C', force=True) + +# Save the program state. +state.save('relax_tensors', force=True)