X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2FMCview%2FPDBfile.java;h=aab4081cf96e106fa85a900da0738a7d739f1a72;hb=066a11f5ce0580b9d7bf0f855432c341aa279bd4;hp=255eee043b32ad338532c0ec91ad29cec5255197;hpb=d423f22792e47dbc800ae220a58677f988971d06;p=jalview.git diff --git a/src/MCview/PDBfile.java b/src/MCview/PDBfile.java index 255eee0..aab4081 100755 --- a/src/MCview/PDBfile.java +++ b/src/MCview/PDBfile.java @@ -1,19 +1,20 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) - * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1) + * Copyright (C) 2014 The Jalview Authors * * This file is part of Jalview. * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - * + * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. */ package MCview; @@ -56,18 +57,18 @@ public class PDBfile extends jalview.io.AlignFile // TODO set the filename sensibly - try using data source name. id = safeName(getDataName()); - try - { - chains = new Vector(); + chains = new Vector(); - PDBChain tmpchain; - String line; - boolean modelFlag = false; - boolean terFlag = false; - String lastID = ""; + PDBChain tmpchain; + String line = null; + boolean modelFlag = false; + boolean terFlag = false; + String lastID = ""; - int index = 0; - String atomnam = null; + int index = 0; + String atomnam = null; + try + { while ((line = nextLine()) != null) { if (line.indexOf("HEADER") == 0) @@ -184,6 +185,13 @@ public class PDBfile extends jalview.io.AlignFile { System.out.println("OUT OF MEMORY LOADING PDB FILE"); throw new IOException("Out of memory loading PDB File"); + } catch (NumberFormatException ex) + { + if (line != null) + { + System.err.println("Couldn't read number from line:"); + System.err.println(line); + } } }