Author: bugman Date: Fri Feb 1 17:05:09 2013 New Revision: 18361 URL: http://svn.gna.org/viewcvs/relax?rev=18361&view=rev Log: Merged revisions 18358-18360 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r18358 | bugman | 2013-02-01 16:53:34 +0100 (Fri, 01 Feb 2013) | 3 lines Created the Bmrb.test_bug_20471_structure_present to catch bug #20471 (https://gna.org/bugs/?20471). ........ r18359 | bugman | 2013-02-01 17:03:20 +0100 (Fri, 01 Feb 2013) | 7 lines Fix for bug #20471 (https://gna.org/bugs/?20471). The problem was that the data pipe is_empty() method was not handling structural data correctly. The is_empty() method now belongs to the MolContainer objects rather than cdp.structure, and the object cdp.structure is not always present. ........ r18360 | bugman | 2013-02-01 17:04:27 +0100 (Fri, 01 Feb 2013) | 7 lines Fix for bug #20471 (https://gna.org/bugs/?20471). The problem was that the data pipe is_empty() method was not handling structural data correctly. The is_empty() method now belongs to the MolContainer objects rather than cdp.structure, and the object cdp.structure is not always present. ........ Added: branches/frame_order_testing/test_suite/shared_data/bmrb/ - copied from r18360, trunk/test_suite/shared_data/bmrb/ branches/frame_order_testing/test_suite/shared_data/structures/1RTE_H_trunc.pdb - copied unchanged from r18360, trunk/test_suite/shared_data/structures/1RTE_H_trunc.pdb Modified: branches/frame_order_testing/ (props changed) branches/frame_order_testing/data/pipe_container.py branches/frame_order_testing/test_suite/system_tests/bmrb.py Propchange: branches/frame_order_testing/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Fri Feb 1 17:05:09 2013 @@ -1,1 +1,1 @@ -/trunk:1-18356 +/trunk:1-18360 Modified: branches/frame_order_testing/data/pipe_container.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/data/pipe_container.py?rev=18361&r1=18360&r2=18361&view=diff ============================================================================== --- branches/frame_order_testing/data/pipe_container.py (original) +++ branches/frame_order_testing/data/pipe_container.py Fri Feb 1 17:05:09 2013 @@ -260,7 +260,7 @@ """ # Is the molecule structure data object empty? - if hasattr(self, 'structure') and not self.structure.is_empty(): + if hasattr(self, 'structure'): return False # Is the molecule/residue/spin data object empty? Modified: branches/frame_order_testing/test_suite/system_tests/bmrb.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/test_suite/system_tests/bmrb.py?rev=18361&r1=18360&r2=18361&view=diff ============================================================================== --- branches/frame_order_testing/test_suite/system_tests/bmrb.py (original) +++ branches/frame_order_testing/test_suite/system_tests/bmrb.py Fri Feb 1 17:05:09 2013 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2008-2012 Edward d'Auvergne # +# Copyright (C) 2008-2013 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -231,6 +231,27 @@ self.assertEqual(cont_old.ri_data_err[ri_id], cont_new.ri_data_err[ri_id]) + def test_bug_20471_structure_present(self): + """Catch bug #20471 (https://gna.org/bugs/?20471), with structural data present prior to a bmrb.read call.""" + + # Create the data pipe. + self.interpreter.pipe.create('test', 'mf') + + # Load the PDB file. + path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'structures' + self.interpreter.structure.read_pdb(file='1RTE_H_trunc.pdb', dir=path, read_mol=None, set_mol_name=None, read_model=None, set_model_num=None, parser='internal', alt_loc='A') + + # Set up the 15N and 1H spins. + self.interpreter.structure.load_spins(spin_id='@N', ave_pos=True) + self.interpreter.structure.load_spins(spin_id='@H', ave_pos=True) + self.interpreter.spin.isotope(isotope='15N', spin_id='@N', force=False) + self.interpreter.spin.isotope(isotope='1H', spin_id='@H', force=False) + + # Load the relaxation data. + path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'bmrb' + self.interpreter.bmrb.read(file='17226.txt', dir=path, version=None, sample_conditions=None) + + def test_rw_bmrb_3_0_model_free(self): """Write and then read a BRMB STAR formatted file containing model-free results."""