mailr7209 - /1.3/generic_fns/structure/internal.py


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

Header


Content

Posted by edward on August 19, 2008 - 16:54:
Author: bugman
Date: Tue Aug 19 16:54:28 2008
New Revision: 7209

URL: http://svn.gna.org/viewcvs/relax?rev=7209&view=rev
Log:
Added a RelaxError for when the PDB MODEL record is corrupted.


Modified:
    1.3/generic_fns/structure/internal.py

Modified: 1.3/generic_fns/structure/internal.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/internal.py?rev=7209&r1=7208&r2=7209&view=diff
==============================================================================
--- 1.3/generic_fns/structure/internal.py (original)
+++ 1.3/generic_fns/structure/internal.py Tue Aug 19 16:54:28 2008
@@ -236,7 +236,10 @@
         for i in xrange(len(lines)):
             # A new model record.
             if search('^MODEL', lines[i]):
-                model = int(split(lines[i])[1])
+                try:
+                    model = int(split(lines[i])[1])
+                except:
+                    raise RelaxError, "The MODEL record " + `lines[i]` + " 
is corrupt, cannot read the PDB file."
 
             # Skip all records prior to the first ATOM or HETATM record.
             if not (search('^ATOM', lines[i]) or search('^HETATM', 
lines[i])) and not len(records):




Related Messages


Powered by MHonArc, Updated Wed Aug 20 21:20:21 2008