Author: bugman Date: Thu Oct 10 14:21:49 2013 New Revision: 21051 URL: http://svn.gna.org/viewcvs/relax?rev=21051&view=rev Log: Fix for bug #21187 - the corrupted PDB issue with protons atom numbers of zero. The bug at https://gna.org/bugs/?21187 was reported by Martin Ballaschk (https://gna.org/users/mab). The fix was to allow for spin containers in the relax data store to have the same atom number, as long as the atom names are different. Note - this may cause problems in the future so a better solution might have to be found. Modified: trunk/data_store/mol_res_spin.py Modified: trunk/data_store/mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/trunk/data_store/mol_res_spin.py?rev=21051&r1=21050&r2=21051&view=diff ============================================================================== --- trunk/data_store/mol_res_spin.py (original) +++ trunk/data_store/mol_res_spin.py Thu Oct 10 14:21:49 2013 @@ -245,14 +245,13 @@ # Test if the spin number (or name if unnumbered) already exists. for i in range(len(self)): # Spin number has been supplied. - if spin_num != None: - if self[i].num == spin_num: - raise RelaxError("The spin number '%s' already exists." % spin_num) + if spin_num != None and spin_name != None: + if self[i].num == spin_num and self[i].name == spin_name: + raise RelaxError("The spin with name '%s' and number '%s' already exists." % (spin_name, spin_num)) # No spin numbers. - else: - if self[i].name == spin_name: - raise RelaxError("The unnumbered spin name '%s' already exists." % spin_name) + if spin_num == None and self[i].name == spin_name: + raise RelaxError("The unnumbered spin name '%s' already exists." % spin_name) # Append a new SpinContainer. self.append(SpinContainer(spin_name, spin_num, select))