Author: bugman Date: Fri Nov 30 10:54:48 2012 New Revision: 18043 URL: http://svn.gna.org/viewcvs/relax?rev=18043&view=rev Log: Created the N_state_model.test_absolute_rdc_menthol system test to demonstrate a pseudo-atom failure. This is a test of the long range, absolute RDCs for menthol. Added: trunk/test_suite/shared_data/align_data/menthol/ trunk/test_suite/shared_data/align_data/menthol/long_range_rdc trunk/test_suite/shared_data/structures/menthol_1R2S5R.pdb trunk/test_suite/system_tests/scripts/n_state_model/absolute_rdcs_menthol.py Modified: trunk/test_suite/system_tests/n_state_model.py Added: trunk/test_suite/shared_data/align_data/menthol/long_range_rdc URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/align_data/menthol/long_range_rdc?rev=18043&view=auto ============================================================================== --- trunk/test_suite/shared_data/align_data/menthol/long_range_rdc (added) +++ trunk/test_suite/shared_data/align_data/menthol/long_range_rdc Fri Nov 30 10:54:48 2012 @@ -1,0 +1,25 @@ +# Spin_ID1 Spin_ID2 RDC error Distance(angstroms) + + @C4 @H13 -0.68 0.14 2.677771 + @C5 @H13 0.95 0.14 2.129824 + @C8 @H5 -0.50 0.28 2.834576 + @C4 @H1 0.99 0.14 2.149821 + @C10 @H13 -0.29 0.14 2.131881 + @C9 @H13 -0.85 0.21 2.136622 + @C1 @H1 0.40 0.21 3.460364 + @C7 @H1 -0.59 0.14 2.765209 + @C3 @H2 -1.01 0.14 2.143767 + @C5 @H4 -0.26 0.14 3.488387 + @C2 @H4 -0.25 0.14 2.162672 + @C7 @H4 -0.47 0.14 2.767868 + @C3 @Q7 1.94 0.14 2.772089 + @C1 @Q7 3.85 0.14 3.487340 + @C2 @H8 -0.54 0.14 3.474681 + @C8 @H8 -1.18 0.28 2.779381 + @C3 @H6 -0.39 0.28 2.709551 + @C1 @H6 -0.70 0.14 2.730567 + @C8 @H6 0.31 0.14 2.139753 + @C7 @H4 -0.47 0.14 2.767868 + + + Added: trunk/test_suite/shared_data/structures/menthol_1R2S5R.pdb URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/structures/menthol_1R2S5R.pdb?rev=18043&view=auto ============================================================================== --- trunk/test_suite/shared_data/structures/menthol_1R2S5R.pdb (added) +++ trunk/test_suite/shared_data/structures/menthol_1R2S5R.pdb Fri Nov 30 10:54:48 2012 @@ -1,0 +1,63 @@ +HETATM 1 C1 UNK 1 1.425 -1.468 -0.176 1.00 0.00 C +HETATM 2 C2 UNK 1 2.222 -0.280 0.360 1.00 0.00 C +HETATM 3 C3 UNK 1 1.596 1.025 -0.136 1.00 0.00 C +HETATM 4 C4 UNK 1 0.113 1.138 0.203 1.00 0.00 C +HETATM 5 C5 UNK 1 -0.675 -0.055 -0.351 1.00 0.00 C +HETATM 6 C6 UNK 1 -0.058 -1.354 0.183 1.00 0.00 C +HETATM 7 H1 UNK 1 2.123 1.893 0.278 1.00 0.00 H +HETATM 8 H2 UNK 1 2.150 -0.293 1.460 1.00 0.00 H +HETATM 9 H3 UNK 1 1.538 -1.511 -1.270 1.00 0.00 H +HETATM 10 H4 UNK 1 1.841 -2.404 0.218 1.00 0.00 H +HETATM 11 H5 UNK 1 -0.003 1.177 1.293 1.00 0.00 H +HETATM 12 H6 UNK 1 -0.527 -0.042 -1.447 1.00 0.00 H +HETATM 13 H7 UNK 1 -0.160 -1.385 1.276 1.00 0.00 H +HETATM 14 H8 UNK 1 -0.606 -2.221 -0.204 1.00 0.00 H +HETATM 15 H9 UNK 1 1.708 1.077 -1.232 1.00 0.00 H +HETATM 16 C7 UNK 1 3.698 -0.366 -0.023 1.00 0.00 C +HETATM 17 H10 UNK 1 4.265 0.478 0.383 1.00 0.00 H +HETATM 18 H11 UNK 1 4.151 -1.289 0.352 1.00 0.00 H +HETATM 19 H12 UNK 1 3.813 -0.355 -1.112 1.00 0.00 H +HETATM 20 C8 UNK 1 -2.192 0.066 -0.105 1.00 0.00 C +HETATM 21 H13 UNK 1 -2.469 1.085 -0.399 1.00 0.00 H +HETATM 22 C9 UNK 1 -2.586 -0.115 1.363 1.00 0.00 C +HETATM 23 H14 UNK 1 -2.031 0.554 2.027 1.00 0.00 H +HETATM 24 H15 UNK 1 -3.650 0.107 1.495 1.00 0.00 H +HETATM 25 H16 UNK 1 -2.424 -1.143 1.700 1.00 0.00 H +HETATM 26 C10 UNK 1 -2.981 -0.903 -0.989 1.00 0.00 C +HETATM 27 H17 UNK 1 -4.057 -0.736 -0.878 1.00 0.00 H +HETATM 28 H18 UNK 1 -2.730 -0.773 -2.046 1.00 0.00 H +HETATM 29 H19 UNK 1 -2.786 -1.947 -0.722 1.00 0.00 H +HETATM 30 O1 UNK 1 -0.416 2.389 -0.246 1.00 0.00 O +HETATM 31 H20 UNK 1 -0.195 2.487 -1.181 1.00 0.00 H +CONECT 1 2 6 9 10 +CONECT 26 20 27 28 29 +CONECT 2 1 3 8 16 +CONECT 3 2 4 7 15 +CONECT 4 3 5 11 30 +CONECT 5 4 6 12 20 +CONECT 6 1 5 13 14 +CONECT 16 2 17 18 19 +CONECT 20 5 21 22 26 +CONECT 22 20 23 24 25 +CONECT 7 3 +CONECT 17 16 +CONECT 18 16 +CONECT 19 16 +CONECT 21 20 +CONECT 23 22 +CONECT 24 22 +CONECT 25 22 +CONECT 27 26 +CONECT 28 26 +CONECT 29 26 +CONECT 8 2 +CONECT 31 30 +CONECT 9 1 +CONECT 10 1 +CONECT 11 4 +CONECT 12 5 +CONECT 13 6 +CONECT 14 6 +CONECT 15 3 +CONECT 30 4 31 +END 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=18043&r1=18042&r2=18043&view=diff ============================================================================== --- trunk/test_suite/system_tests/n_state_model.py (original) +++ trunk/test_suite/system_tests/n_state_model.py Fri Nov 30 10:54:48 2012 @@ -178,6 +178,22 @@ i += 1 + def test_absolute_rdc_menthol(self): + """Test the fitting of signless RDCs for menthol.""" + + # Execute the script. + self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'n_state_model'+sep+'absolute_rdcs_menthol.py') + + # Test the optimised values. + self.assertAlmostEqual(cdp.align_tensors[0].Axx, -0.351261/2000) + self.assertAlmostEqual(cdp.align_tensors[0].Ayy, 0.556994/2000) + self.assertAlmostEqual(cdp.align_tensors[0].Axy, -0.506392/2000) + self.assertAlmostEqual(cdp.align_tensors[0].Axz, 0.560544/2000) + self.assertAlmostEqual(cdp.align_tensors[0].Ayz, -0.286367/2000) + self.assertAlmostEqual(cdp.chi2, 0.0) + self.assertAlmostEqual(cdp.q_rdc, 0.0) + + def test_align_fit(self): """Test the use of RDCs and PCSs to find the alignment tensor.""" Added: trunk/test_suite/system_tests/scripts/n_state_model/absolute_rdcs_menthol.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/scripts/n_state_model/absolute_rdcs_menthol.py?rev=18043&view=auto ============================================================================== --- trunk/test_suite/system_tests/scripts/n_state_model/absolute_rdcs_menthol.py (added) +++ trunk/test_suite/system_tests/scripts/n_state_model/absolute_rdcs_menthol.py Fri Nov 30 10:54:48 2012 @@ -1,0 +1,53 @@ +"""Script for testing the fitting of signless RDCs using menthol data.""" + +# Python module imports. +from os import sep + +# relax module imports. +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+'menthol' +STRUCT_PATH = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'structures' + +# Create the data pipe. +self._execute_uf(uf_name='pipe.create', pipe_name='long-range RDC', pipe_type='N-state') + +# Load the structure. +self._execute_uf(uf_name='structure.read_pdb', file='menthol_1R2S5R.pdb', dir=STRUCT_PATH) + +# Set up the 13C and 1H spins information. +self._execute_uf(uf_name='structure.load_spins', spin_id='@C*', ave_pos=False) +self._execute_uf(uf_name='structure.load_spins', spin_id='@H*', ave_pos=False) + +# Set up the pseudo-atoms. +self._execute_uf(uf_name='spin.create_pseudo', spin_name='Q7', members=['@H10', '@H11', '@H12'], averaging="linear") +self._execute_uf(uf_name='spin.create_pseudo', spin_name='Q9', members=['@H14', '@H15', '@H16'], averaging="linear") +self._execute_uf(uf_name='spin.create_pseudo', spin_name='Q10', members=['@H17', '@H18', '@H19'], averaging="linear") +self._execute_uf(uf_name='sequence.display') + +# Define the nuclear isotopes of all spins and pseudo-spins. +self._execute_uf(uf_name='spin.isotope', isotope='13C', spin_id='@C*') +self._execute_uf(uf_name='spin.isotope', isotope='1H', spin_id='@H*') +self._execute_uf(uf_name='spin.isotope', isotope='1H', spin_id='@Q*') + +# Load the RDC data. +self._execute_uf(uf_name='rdc.read', align_id='Gel', file='long_range_rdc', dir=DATA_PATH, spin_id1_col=1, spin_id2_col=2, data_col=3, error_col=4, absolute=True) + +# Define the magnetic dipole-dipole relaxation interaction. +self._execute_uf(uf_name='dipole_pair.read_dist', file='long_range_rdc', dir=DATA_PATH, unit='Angstrom', spin_id1_col=1, spin_id2_col=2, data_col=5) +self._execute_uf(uf_name='dipole_pair.unit_vectors', ave=False) + +# Set up the model. +self._execute_uf(uf_name='n_state_model.select_model', model='fixed') + +# Minimisation. +self._execute_uf(uf_name='minimise', min_algor='newton') + +# Show the tensors. +self._execute_uf(uf_name='align_tensor.display') + +# Save the state. +self._execute_uf(uf_name='state.save', file='devnull')