From: Jim Procter Date: Sun, 7 Jul 2013 12:08:52 +0000 (+0100) Subject: JAL-1345 - set nSeconds arg for http://chemapps.stolaf.edu/jmol/docs/#compare accordi... X-Git-Tag: Jalview_2_9~229^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=ac74307dcabaf35928007b2aecdf9a40f4dac65f;p=jalview.git JAL-1345 - set nSeconds arg for chemapps.stolaf.edu/jmol/docs/#compare according to total number of superpositions --- diff --git a/src/jalview/ext/jmol/JalviewJmolBinding.java b/src/jalview/ext/jmol/JalviewJmolBinding.java index 458a178..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++) { @@ -553,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} {");