X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fext%2Fjmol%2FJmolParser.java;h=0ca2ba81184c44367da7dfc10344d5dbd7613359;hb=67f21ba986462faaa66c606709463fff6c29c116;hp=b7c83c686b55ce2446b212369dbd2bb542428c70;hpb=c71453f1c7de4cc250700c1b6dd39d061982e794;p=jalview.git diff --git a/src/jalview/ext/jmol/JmolParser.java b/src/jalview/ext/jmol/JmolParser.java index b7c83c6..0ca2ba8 100644 --- a/src/jalview/ext/jmol/JmolParser.java +++ b/src/jalview/ext/jmol/JmolParser.java @@ -92,7 +92,6 @@ public class JmolParser extends StructureFile implements JmolStatusListener { super(fp, doXferSettings); } - public JmolParser(FileParse fp) throws IOException { super(fp); @@ -315,21 +314,31 @@ public class JmolParser extends StructureFile implements JmolStatusListener // add a PAEMatrix if set (either by above or otherwise) if (hasPAEMatrix()) { - Alignment al = new Alignment(prot.toArray(new SequenceI[0])); - EBIAlfaFold.addAlphaFoldPAE(al, new File(this.getPAEMatrix()), 0, - null, false, false, null); - - if (al.getAlignmentAnnotation() != null) + try { - for (AlignmentAnnotation alann : al.getAlignmentAnnotation()) + Alignment al = new Alignment(prot.toArray(new SequenceI[0])); + EBIAlfaFold.addAlphaFoldPAE(al, new File(this.getPAEMatrix()), 0, + null, false, false, null); + + if (al.getAlignmentAnnotation() != null) { - annotations.add(alann); + for (AlignmentAnnotation alann : al.getAlignmentAnnotation()) + { + annotations.add(alann); + } } + } catch (Throwable ff) + { + Console.error("Couldn't import PAE Matrix from " + getPAEMatrix(), + ff); + warningMessage += "Couldn't import PAE Matrix" + + getNewlineString() + ff.getLocalizedMessage() + + getNewlineString(); } } } catch (OutOfMemoryError er) { - System.out.println( + jalview.bin.Console.outPrintln( "OUT OF MEMORY LOADING TRANSFORMING JMOL MODEL TO JALVIEW MODEL"); throw new IOException(MessageManager .getString("exception.outofmemory_loading_mmcif_file")); @@ -382,7 +391,7 @@ public class JmolParser extends StructureFile implements JmolStatusListener org.jmol.modelset.Atom prevAtom, HashMap chainTerMap) { - // System.out.println("Atom: " + curAtom.getAtomNumber() + // jalview.bin.Console.outPrintln("Atom: " + curAtom.getAtomNumber() // + " Last atom index " + curAtom.group.lastAtomIndex); if (chainTerMap == null || prevAtom == null) { @@ -479,7 +488,7 @@ public class JmolParser extends StructureFile implements JmolStatusListener { int length = sq.getLength(); boolean ssFound = false; - Annotation asecstr[] = new Annotation[length + firstResNum - 1]; + Annotation asecstr[] = new Annotation[length + (firstResNum-sq.getStart())]; for (int p = 0; p < length; p++) { if (secstr[p] >= 'A' && secstr[p] <= 'z')