patch for JAL-655
authorjprocter <Jim Procter>
Thu, 11 Nov 2010 18:08:14 +0000 (18:08 +0000)
committerjprocter <Jim Procter>
Thu, 11 Nov 2010 18:08:14 +0000 (18:08 +0000)
src/jalview/ext/jmol/JalviewJmolBinding.java
src/jalview/gui/AppJmol.java

index a314fd6..67b688c 100644 (file)
@@ -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} {");
index 041d6a2..19178f2 100644 (file)
@@ -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())
           ;