mailr2612 - /1.2/generic_fns/sequence.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on October 12, 2006 - 05:16:
Author: bugman
Date: Thu Oct 12 05:16:22 2006
New Revision: 2612

URL: http://svn.gna.org/viewcvs/relax?rev=2612&view=rev
Log:
Fixing the rest of bug #7241 (https://gna.org/bugs/?7241).

Bug #7241 was thought to be fixed in in r2591 and r2593, the commit messages 
describing the solution
being located at 
https://mail.gna.org/public/relax-commits/2006-09/msg00064.html (Message-id:
<E1GTgBi-0000R6-4h@xxxxxxxxxxxxxxxxxx>) for r2591 and
https://mail.gna.org/public/relax-commits/2006-10/msg00001.html (Message-id:
<E1GTt6C-0005rk-8q@xxxxxxxxxxxxxxxxxx>) for r2593.

However this was not the only place that the Scientific Python PDB data 
structure peptide_chains was
being accessed.  The chains were being accessed in the file 
'generic_fns/sequence.py' when the
sequence was being read out of the PDB file.  This has now been modified with 
changes similar to
r2591 and r2593.


Modified:
    1.2/generic_fns/sequence.py

Modified: 1.2/generic_fns/sequence.py
URL: 
http://svn.gna.org/viewcvs/relax/1.2/generic_fns/sequence.py?rev=2612&r1=2611&r2=2612&view=diff
==============================================================================
--- 1.2/generic_fns/sequence.py (original)
+++ 1.2/generic_fns/sequence.py Thu Oct 12 05:16:22 2006
@@ -143,7 +143,12 @@
         print "\nLoading the sequence from the PDB file.\n"
 
         # Reassign the sequence of the first structure.
-        res = 
self.relax.data.pdb[run].structures[0].peptide_chains[0].residues
+        if self.relax.data.pdb[self.run].structures[i].peptide_chains:
+            res = 
self.relax.data.pdb[self.run].structures[i].peptide_chains[0].residues
+        elif self.relax.data.pdb[self.run].structures[i].nucleotide_chains:
+            res = 
self.relax.data.pdb[self.run].structures[i].nucleotide_chains[0].residues
+        else:
+            raise RelaxNoPdbChainError
 
         # Add the run to 'self.relax.data.res'.
         self.relax.data.res.add_list(run)




Related Messages


Powered by MHonArc, Updated Thu Oct 12 05:40:05 2006