Author: bugman Date: Mon Jan 14 17:56:26 2013 New Revision: 18201 URL: http://svn.gna.org/viewcvs/relax?rev=18201&view=rev Log: RDC data fix for the _back_compat_hook() method for converting old relax state and results files. The RDC data was not being shifted into the corresponding interatomic data container and remained in the spin containers. Modified: trunk/data/__init__.py Modified: trunk/data/__init__.py URL: http://svn.gna.org/viewcvs/relax/trunk/data/__init__.py?rev=18201&r1=18200&r2=18201&view=diff ============================================================================== --- trunk/data/__init__.py (original) +++ trunk/data/__init__.py Mon Jan 14 17:56:26 2013 @@ -269,21 +269,21 @@ if hasattr(spin, 'xh_vect'): interatom.vector = spin.xh_vect + # Set the RDC values. + if hasattr(spin, 'rdc'): + interatom.rdc = spin.rdc + if hasattr(spin, 'rdc_err'): + interatom.rdc_err = spin.rdc_err + if hasattr(spin, 'rdc_sim'): + interatom.rdc_sim = spin.rdc_sim + if hasattr(spin, 'rdc_bc'): + interatom.rdc_bc = spin.rdc_bc + # Delete the old structures. - if hasattr(spin, 'heteronuc_type'): - del spin.heteronuc_type - if hasattr(spin, 'proton_type'): - del spin.proton_type - if hasattr(spin, 'attached_proton'): - del spin.attached_proton - if hasattr(spin, 'r'): - del spin.r - if hasattr(spin, 'r_err'): - del spin.r_err - if hasattr(spin, 'r_sim'): - del spin.r_sim - if hasattr(spin, 'xh_vect'): - del spin.xh_vect + eliminate = ['heteronuc_type', 'proton_type', 'attached_proton', 'r', 'r_err', 'r_sim', 'rdc', 'rdc_err', 'rdc_sim', 'rdc_bc', 'xh_vect'] + for name in eliminate: + if hasattr(spin, name): + delattr(spin, name) def add(self, pipe_name, pipe_type, bundle=None, switch=True):