Author: bugman Date: Thu Oct 10 13:59:33 2013 New Revision: 21050 URL: http://svn.gna.org/viewcvs/relax?rev=21050&view=rev Log: Merged revisions 21049 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r21049 | bugman | 2013-10-10 13:58:50 +0200 (Thu, 10 Oct 2013) | 5 lines Created the Structure.test_bug_21187_corrupted_pdb system test to catch bug #21187. The bug at https://gna.org/bugs/?21187 was reported by Martin Ballaschk (https://gna.org/users/mab). ........ Added: branches/relax_disp/test_suite/shared_data/structures/bug_21187_molecule.pdb - copied unchanged from r21049, trunk/test_suite/shared_data/structures/bug_21187_molecule.pdb Modified: branches/relax_disp/ (props changed) branches/relax_disp/test_suite/system_tests/structure.py Propchange: branches/relax_disp/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Thu Oct 10 13:59:33 2013 @@ -1,1 +1,1 @@ -/trunk:1-21026 +/trunk:1-21049 Modified: branches/relax_disp/test_suite/system_tests/structure.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/system_tests/structure.py?rev=21050&r1=21049&r2=21050&view=diff ============================================================================== --- branches/relax_disp/test_suite/system_tests/structure.py (original) +++ branches/relax_disp/test_suite/system_tests/structure.py Thu Oct 10 13:59:33 2013 @@ -75,6 +75,24 @@ self.interpreter.structure.read_pdb('1OGT_trunc.pdb', dir=path, alt_loc='A') self.interpreter.structure.load_spins(spin_id='@N', ave_pos=True) self.interpreter.sequence.attach_protons() + + + def test_bug_21187_corrupted_pdb(self): + """Catch U{bug #21187<https://gna.org/bugs/?21187>}, the corrupted PDB with all proton atoms numbers set to zero.""" + + # Path of the structure file. + path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'structures' + + # Load the file. + self.interpreter.structure.read_pdb('bug_21187_molecule.pdb', dir=path) + + # Load the @N, @H, and @NE1 spins (needed to create the :60@0 spin to trigger the bug later). + self.interpreter.structure.load_spins(spin_id='@N', ave_pos=True) + self.interpreter.structure.load_spins(spin_id='@NE1', ave_pos=True) + self.interpreter.structure.load_spins(spin_id='@H', ave_pos=True) + + # Load the :60@HE1 spin - this clashes with the :60@H spin as both have the spin ID of ':60@0'. + self.interpreter.structure.load_spins(spin_id='@HE1', ave_pos=True) def test_delete_empty(self):