From f15837f03963ef2d3e53d890cdb4f04f75cc1728 Mon Sep 17 00:00:00 2001 From: jprocter Date: Mon, 8 Jun 2009 10:40:37 +0000 Subject: [PATCH] patch for wierd format header lines and apply gpl development license --- src/MCview/PDBfile.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/MCview/PDBfile.java b/src/MCview/PDBfile.java index 5fd3d10..c671ec2 100755 --- a/src/MCview/PDBfile.java +++ b/src/MCview/PDBfile.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4) - * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) + * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -70,8 +70,15 @@ public class PDBfile extends jalview.io.AlignFile { if (line.indexOf("HEADER") == 0) { - id = line.substring(62, 67).trim(); - continue; + if (line.length()>62) + { + if (line.length()>67) { + id = line.substring(62, 67).trim(); + } else { + id=line.substring(62).trim(); + } + continue; + } } // Were we to do anything with SEQRES - we start it here if (line.indexOf("SEQRES") == 0) -- 1.7.10.2