Author: bugman Date: Fri Nov 30 13:02:37 2012 New Revision: 18051 URL: http://svn.gna.org/viewcvs/relax?rev=18051&view=rev Log: Merged revisions 18043-18048 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r18043 | bugman | 2012-11-30 10:54:48 +0100 (Fri, 30 Nov 2012) | 5 lines 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. ........ r18044 | bugman | 2012-11-30 10:58:01 +0100 (Fri, 30 Nov 2012) | 7 lines Bug fix for the use of pseudo-atoms for RDCs in the N-state model analysis. If the second atom of the pair in the intermolecular data container holding the RDC data was a pseudo-atom, then the N-state model optimisation setup would fail. Now both the first and second atoms being pseudo-atoms is supported. ........ r18045 | bugman | 2012-11-30 11:03:20 +0100 (Fri, 30 Nov 2012) | 3 lines Fixes for the N_state_model.test_absolute_rdc_menthol system test checks to match the data. ........ r18046 | bugman | 2012-11-30 11:17:02 +0100 (Fri, 30 Nov 2012) | 3 lines Added a check for the second Q factor in the N_state_model.test_absolute_rdc_menthol system test. ........ r18047 | bugman | 2012-11-30 12:57:10 +0100 (Fri, 30 Nov 2012) | 6 lines Modified the N_state_model.test_populations system test to catch bug #20335. This simply adds calls to the rdc.delete and pcs.delete user functions, and then reloads the RDC and PCS data. ........ r18048 | bugman | 2012-11-30 13:00:20 +0100 (Fri, 30 Nov 2012) | 5 lines Fix for bug #20335 (https://gna.org/bugs/?20335). The global alignment ID data structure now has the RDC or PCS ID string correctly removed. ........ Added: branches/cst/test_suite/shared_data/align_data/menthol/ - copied from r18048, trunk/test_suite/shared_data/align_data/menthol/ branches/cst/test_suite/shared_data/structures/menthol_1R2S5R.pdb - copied unchanged from r18048, trunk/test_suite/shared_data/structures/menthol_1R2S5R.pdb branches/cst/test_suite/system_tests/scripts/n_state_model/absolute_rdcs_menthol.py - copied unchanged from r18048, trunk/test_suite/system_tests/scripts/n_state_model/absolute_rdcs_menthol.py Modified: branches/cst/ (props changed) branches/cst/generic_fns/pcs.py branches/cst/generic_fns/rdc.py branches/cst/specific_fns/n_state_model.py branches/cst/test_suite/system_tests/n_state_model.py branches/cst/test_suite/system_tests/scripts/n_state_model/populations.py Propchange: branches/cst/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Fri Nov 30 13:02:37 2012 @@ -1,1 +1,1 @@ -/trunk:1-18038 +/trunk:1-18050 Modified: branches/cst/generic_fns/pcs.py URL: http://svn.gna.org/viewcvs/relax/branches/cst/generic_fns/pcs.py?rev=18051&r1=18050&r2=18051&view=diff ============================================================================== --- branches/cst/generic_fns/pcs.py (original) +++ branches/cst/generic_fns/pcs.py Fri Nov 30 13:02:37 2012 @@ -448,7 +448,7 @@ # Clean the global data. if not hasattr(cdp, 'rdc_ids') or id not in cdp.rdc_ids: - cdp.align_ids.pop(id) + cdp.align_ids.pop(cdp.align_ids.index(id)) def display(align_id=None, bc=False): Modified: branches/cst/generic_fns/rdc.py URL: http://svn.gna.org/viewcvs/relax/branches/cst/generic_fns/rdc.py?rev=18051&r1=18050&r2=18051&view=diff ============================================================================== --- branches/cst/generic_fns/rdc.py (original) +++ branches/cst/generic_fns/rdc.py Fri Nov 30 13:02:37 2012 @@ -371,7 +371,7 @@ # Clean the global data. if not hasattr(cdp, 'pcs_ids') or id not in cdp.pcs_ids: - cdp.align_ids.pop(id) + cdp.align_ids.pop(cdp.align_ids.index(id)) def display(align_id=None, bc=False): Modified: branches/cst/specific_fns/n_state_model.py URL: http://svn.gna.org/viewcvs/relax/branches/cst/specific_fns/n_state_model.py?rev=18051&r1=18050&r2=18051&view=diff ============================================================================== --- branches/cst/specific_fns/n_state_model.py (original) +++ branches/cst/specific_fns/n_state_model.py Fri Nov 30 13:02:37 2012 @@ -1092,7 +1092,7 @@ # Pseudo-atom set up. if (hasattr(spin1, 'members') or hasattr(spin2, 'members')) and align_id in interatom.rdc.keys(): # Skip non-Me groups. - if len(spin1.members) != 3: + if (hasattr(spin1, 'members') and len(spin1.members) != 3) or (hasattr(spin2, 'members') and len(spin2.members) != 3): continue # The RDC for the Me-pseudo spin where: Modified: branches/cst/test_suite/system_tests/n_state_model.py URL: http://svn.gna.org/viewcvs/relax/branches/cst/test_suite/system_tests/n_state_model.py?rev=18051&r1=18050&r2=18051&view=diff ============================================================================== --- branches/cst/test_suite/system_tests/n_state_model.py (original) +++ branches/cst/test_suite/system_tests/n_state_model.py Fri Nov 30 13:02:37 2012 @@ -178,6 +178,23 @@ 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, -9.784232367053e-05) + self.assertAlmostEqual(cdp.align_tensors[0].Ayy, -7.158933725824e-05) + self.assertAlmostEqual(cdp.align_tensors[0].Axy, 4.467570786770e-06) + self.assertAlmostEqual(cdp.align_tensors[0].Axz, 5.153319781627e-06) + self.assertAlmostEqual(cdp.align_tensors[0].Ayz, 1.801211682780e-04) + self.assertAlmostEqual(cdp.chi2, 1044.9572886805781) + self.assertAlmostEqual(cdp.q_rdc, 0.0) + self.assertAlmostEqual(cdp.q_rdc_norm2, 0.81262759306400001) + + def test_align_fit(self): """Test the use of RDCs and PCSs to find the alignment tensor.""" Modified: branches/cst/test_suite/system_tests/scripts/n_state_model/populations.py URL: http://svn.gna.org/viewcvs/relax/branches/cst/test_suite/system_tests/scripts/n_state_model/populations.py?rev=18051&r1=18050&r2=18051&view=diff ============================================================================== --- branches/cst/test_suite/system_tests/scripts/n_state_model/populations.py (original) +++ branches/cst/test_suite/system_tests/scripts/n_state_model/populations.py Fri Nov 30 13:02:37 2012 @@ -59,6 +59,25 @@ # The frequency. self._execute_uf(uf_name='frq.set', id=align_list[i], frq=799.75376122 * 1e6) +# Try to delete the RDC and PCS data (bug #20335, https://gna.org/bugs/?20335). +self._execute_uf(uf_name='pcs.delete') +self._execute_uf(uf_name='rdc.delete') + +# Load the RDCs and PCSs. +for i in range(len(align_list)): + # The RDC (skip the list at index 1, as this has zero data and now causes a RelaxError). + if i != 1: + self._execute_uf(uf_name='rdc.read', align_id=align_list[i], file='missing_rdc_%i' % i, dir=data_path, spin_id1_col=1, spin_id2_col=2, data_col=3, error_col=None) + + # The PCS. + self._execute_uf(uf_name='pcs.read', align_id=align_list[i], file='missing_pcs_%i' % i, dir=data_path, mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=None, spin_name_col=5, data_col=6, error_col=None) + + # The temperature. + self._execute_uf(uf_name='temperature', id=align_list[i], temp=298) + + # The frequency. + self._execute_uf(uf_name='frq.set', id=align_list[i], frq=799.75376122 * 1e6) + # Set the paramagnetic centre. self._execute_uf(uf_name='paramag.centre', pos=[ -14.845, 0.969, 0.265])