Author: bugman Date: Thu Nov 2 07:20:34 2006 New Revision: 2725 URL: http://svn.gna.org/viewcvs/relax?rev=2725&view=rev Log: Fixed a bug in the 'pdb.create_tensor_pdb()' user function when no diffusion tensor has been loaded. This was reported by Chris MacRaild at https://mail.gna.org/public/relax-devel/2006-10/msg00204.html (Message-id: <1162304784.3525.133.camel@mrspell>). The solution was simply to add a test for the presence of the diffusion tensor. Modified: branches/tensor_pdb/generic_fns/pdb.py Modified: branches/tensor_pdb/generic_fns/pdb.py URL: http://svn.gna.org/viewcvs/relax/branches/tensor_pdb/generic_fns/pdb.py?rev=2725&r1=2724&r2=2725&view=diff ============================================================================== --- branches/tensor_pdb/generic_fns/pdb.py (original) +++ branches/tensor_pdb/generic_fns/pdb.py Thu Nov 2 07:20:34 2006 @@ -217,7 +217,11 @@ if not run in self.relax.data.run_names: raise RelaxNoRunError, run - # Test if PDB data corresponding to the run already exists. + # Test if the diffusion tensor data is loaded. + if not self.relax.data.diff.has_key(run): + raise RelaxNoTensorError, run + + # Test if the PDB file of the macromolecule has been loaded. if not self.relax.data.pdb.has_key(self.run): raise RelaxNoPdbError, self.run