X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2FMCview%2FPDBfile.java;h=a6ad951cb0b2658dab9aef8ec86c65f17dee3cbe;hb=aa030270d61a25a3417f674c48c2d323ff238277;hp=255eee043b32ad338532c0ec91ad29cec5255197;hpb=d423f22792e47dbc800ae220a58677f988971d06;p=jalview.git diff --git a/src/MCview/PDBfile.java b/src/MCview/PDBfile.java index 255eee0..a6ad951 100755 --- a/src/MCview/PDBfile.java +++ b/src/MCview/PDBfile.java @@ -1,13 +1,13 @@ /* - * 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) + * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle * * 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 @@ -56,18 +56,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 +184,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); + } } }