+ id = inFile.getName();
+ }
+ for (int i = 0; i < chains.size(); i++)
+ {
+ SequenceI dataset = ((PDBChain) chains.elementAt(i)).sequence;
+ dataset.setName(id + "|" + dataset.getName());
+ PDBEntry entry = new PDBEntry();
+ entry.setId(id);
+ if (inFile != null)
+ {
+ entry.setFile(inFile.getAbsolutePath());
+ }
+ else
+ {
+ // TODO: decide if we should dump the datasource to disk
+ entry.setFile(getDataName());
+ }
+ dataset.addPDBId(entry);
+ SequenceI chainseq = dataset.deriveSequence(); // PDBChain objects
+ // maintain reference to
+ // dataset
+ seqs.addElement(chainseq);
+ AlignmentAnnotation[] chainannot = chainseq.getAnnotation();
+ if (chainannot != null)
+ {
+ for (int ai = 0; ai < chainannot.length; ai++)
+ {
+ chainannot[ai].visible = VisibleChainAnnotation;
+ annotations.addElement(chainannot[ai]);
+ }
+ }
+ }
+ } catch (OutOfMemoryError er)
+ {
+ 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);