From 6b71746c98f7c1118b474b0b920db3bd7b2a15c0 Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 11 Nov 2010 18:08:14 +0000 Subject: [PATCH] patch for JAL-655 --- src/jalview/ext/jmol/JalviewJmolBinding.java | 9 ++++++++- src/jalview/gui/AppJmol.java | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/jalview/ext/jmol/JalviewJmolBinding.java b/src/jalview/ext/jmol/JalviewJmolBinding.java index a314fd6..67b688c 100644 --- a/src/jalview/ext/jmol/JalviewJmolBinding.java +++ b/src/jalview/ext/jmol/JalviewJmolBinding.java @@ -317,6 +317,7 @@ public abstract class JalviewJmolBinding implements StructureListener, String isel[] = new String[files.length]; // reference structure - all others are superposed in it String[] targetC = new String[files.length]; + String[] chainNames = new String[files.length]; for (int pdbfnum = 0; pdbfnum < files.length; pdbfnum++) { StructureMapping[] mapping = ssm.getMapping(files[pdbfnum]); @@ -379,6 +380,7 @@ public abstract class JalviewJmolBinding implements StructureListener, { targetC[pdbfnum] = ":" + mapping[m].getChain(); } + chainNames[pdbfnum] = mapping[m].getPdbId()+targetC[pdbfnum]; // move on to next pdb file s = sequence[pdbfnum].length; break; @@ -461,7 +463,12 @@ public abstract class JalviewJmolBinding implements StructureListener, { continue; } - command.append("compare "); + command.append("echo "); + command.append("\"Superposing ("); + command.append(chainNames[pdbfnum]); + command.append(") against reference ("); + command.append(chainNames[refStructure]); + command.append(")\";\ncompare "); command.append("{"); command.append(1 + pdbfnum); command.append(".1} {"); diff --git a/src/jalview/gui/AppJmol.java b/src/jalview/gui/AppJmol.java index 041d6a2..19178f2 100644 --- a/src/jalview/gui/AppJmol.java +++ b/src/jalview/gui/AppJmol.java @@ -546,6 +546,7 @@ public class AppJmol extends GStructureViewer implements Runnable, cmd.append("\nloadingJalviewdata=null"); final String command = cmd.toString(); cmd = null; + long lastnotify = jmb.getLoadNotifiesHandled(); try { jmb.evalStateCommand(command); @@ -559,7 +560,6 @@ public class AppJmol extends GStructureViewer implements Runnable, { Cache.log.error("Couldn't add files to Jmol viewer!", ex); } - long lastnotify = jmb.getLoadNotifiesHandled(); // need to wait around until script has finished while (lastnotify >= jmb.getLoadNotifiesHandled()) ; -- 1.7.10.2