X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fext%2Fjmol%2FJalviewJmolBinding.java;h=729780cf928b9f135ee1c551bbd7af4d52ea427d;hb=2fc1013d3c126983a8d7d932671168e11cfab63d;hp=c7496df9b4346db53ba611e5d2a3da5261b9d091;hpb=c37b687de83b672fb6585db5fcd93189e3582139;p=jalview.git diff --git a/src/jalview/ext/jmol/JalviewJmolBinding.java b/src/jalview/ext/jmol/JalviewJmolBinding.java index c7496df..729780c 100644 --- a/src/jalview/ext/jmol/JalviewJmolBinding.java +++ b/src/jalview/ext/jmol/JalviewJmolBinding.java @@ -63,11 +63,6 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel implements JmolStatusListener, JmolSelectionListener, ComponentListener { - /* - * state flag used to check if the Jmol viewer's paint method can be called - */ - private boolean finishedInit = false; - boolean allChainsSelected = false; /* @@ -259,8 +254,17 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel public void superposeStructures(AlignmentI[] _alignment, int[] _refStructure, ColumnSelection[] _hiddenCols) { + while (viewer.isScriptExecuting()) + { + try + { + Thread.sleep(10); + } catch (InterruptedException i) + { + } + ; + } String[] files = getPdbFile(); - if (!waitForFileLoad(files)) { return; @@ -272,7 +276,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel String nSeconds = " "; if (files.length > 10) { - nSeconds = " 0.00001 "; + nSeconds = " 0.005 "; } else { @@ -281,7 +285,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel } // see JAL-1345 - should really automatically turn off the animation for // large numbers of structures, but Jmol doesn't seem to allow that. - nSeconds = " "; + // nSeconds = " "; // union of all aligned positions are collected together. for (int a = 0; a < _alignment.length; a++) { @@ -667,6 +671,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel // applet path with docroot - discard as format won't match pdbfile mset[0] = m; } + _modelFileNameMap[0] = 0; // filename index for first model is always 0. } int j = 1; for (int i = 1; i < mset.length; i++) @@ -942,7 +947,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel String mdlString = ""; if ((p = strInfo.indexOf(":")) > -1) { - picked += strInfo.substring(p + 1, strInfo.indexOf(".")); + picked += strInfo.substring(p, strInfo.indexOf(".")); } if ((p = strInfo.indexOf("/")) > -1) @@ -1216,7 +1221,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel // } if (!isLoadingFromArchive()) { - viewer.evalStringQuiet("model 0; select backbone;restrict;cartoon;wireframe off;spacefill off"); + viewer.evalStringQuiet("model *; select backbone;restrict;cartoon;wireframe off;spacefill off"); } // register ourselves as a listener and notify the gui that it needs to // update itself. @@ -1401,16 +1406,6 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel return null; } - public boolean isFinishedInit() - { - return finishedInit; - } - - public void setFinishedInit(boolean finishedInit) - { - this.finishedInit = finishedInit; - } - /** * */