X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Fext%2Fjmol%2FJalviewJmolBinding.java;h=f31272ace6ff4981d3a76d7d0160d2e5894b93f3;hb=ac74307dcabaf35928007b2aecdf9a40f4dac65f;hp=db1162ee6c237f737025a67e83bffa5c55b01bec;hpb=b664e416bc329636167a511e42e2410abb59782f;p=jalview.git diff --git a/src/jalview/ext/jmol/JalviewJmolBinding.java b/src/jalview/ext/jmol/JalviewJmolBinding.java index db1162e..f31272a 100644 --- a/src/jalview/ext/jmol/JalviewJmolBinding.java +++ b/src/jalview/ext/jmol/JalviewJmolBinding.java @@ -357,8 +357,21 @@ public abstract class JalviewJmolBinding implements StructureListener, return; } StringBuffer selectioncom = new StringBuffer(); - - + // In principle - nSeconds specifies the speed of animation for each + // superposition - but is seems to behave weirdly, so we don't specify it. + String nSeconds = " "; + if (files.length > 10) + { + nSeconds = " 0.00001 "; + } + else + { + nSeconds = " " + (2.0 / files.length) + " "; + // if (nSeconds).substring(0,5)+" "; + } + // see JAL-1345 - should really automatically turn off the animation for + // large numbers of structures, but Jmol doesn't seem to allow that. + nSeconds = " "; // union of all aligned positions are collected together. for (int a = 0; a < _alignment.length; a++) { @@ -403,8 +416,9 @@ public abstract class JalviewJmolBinding implements StructureListener, // RACE CONDITION - getMapping only returns Jmol loaded filenames once // Jmol callback has completed. if (mapping == null || mapping.length < 1) - continue; - + { + throw new Error("Implementation error - Jmol seems to be still working on getting its data - report at http://issues.jalview.org/browse/JAL-1016"); + } int lastPos = -1; for (int s = 0; s < sequence[pdbfnum].length; s++) { @@ -552,7 +566,7 @@ public abstract class JalviewJmolBinding implements StructureListener, command.append(chainNames[pdbfnum]); command.append(") against reference ("); command.append(chainNames[refStructure]); - command.append(")\";\ncompare "); + command.append(")\";\ncompare "+nSeconds); command.append("{"); command.append(1 + pdbfnum); command.append(".1} {");