Author: bugman Date: Thu Oct 10 14:22:36 2013 New Revision: 21052 URL: http://svn.gna.org/viewcvs/relax?rev=21052&view=rev Log: Merged revisions 21051 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r21051 | bugman | 2013-10-10 14:21:49 +0200 (Thu, 10 Oct 2013) | 9 lines 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: branches/relax_disp/ (props changed) branches/relax_disp/data_store/mol_res_spin.py Propchange: branches/relax_disp/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Thu Oct 10 14:22:36 2013 @@ -1,1 +1,1 @@ -/trunk:1-21049 +/trunk:1-21051 Modified: branches/relax_disp/data_store/mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/data_store/mol_res_spin.py?rev=21052&r1=21051&r2=21052&view=diff ============================================================================== --- branches/relax_disp/data_store/mol_res_spin.py (original) +++ branches/relax_disp/data_store/mol_res_spin.py Thu Oct 10 14:22:36 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))