- List<ChimeraModel> cms = chimeraMaps.get(pdbfile);
- if (cms != null)
- {
- StringBuilder sb = new StringBuilder();
- sb.append(" #" + cms.get(0).getModelNumber());
- sb.append(":" + pdbResNum);
- if (!chain.equals(" "))
- {
- sb.append("." + chain);
- }
- String atomSpec = sb.toString();
-
- StringBuilder command = new StringBuilder(32);
- if (lastMousedOverAtomSpec != null)
- {
- command.append("~show " + lastMousedOverAtomSpec + ";");
- }
- viewerCommandHistory(false);
- command.append("show ").append(atomSpec);
- String cmd = command.toString();
- if (cmd.length() > 0)
- {
- viewer.sendChimeraCommand(cmd, false);
- }
- viewerCommandHistory(true);
- this.lastMousedOverAtomSpec = atomSpec;
- }
- }
-
- private void log(String message)
- {
- System.err.println("## Chimera log: " + message);
- }
-
- private void viewerCommandHistory(boolean enable)
- {
- // log("(Not yet implemented) History "
- // + ((debug || enable) ? "on" : "off"));
- }
-
- public void loadInline(String string)
- {
- loadedInline = true;
- // TODO: re JAL-623
- // viewer.loadInline(strModel, isAppend);
- // could do this:
- // construct fake fullPathName and fileName so we can identify the file
- // later.
- // Then, construct pass a reader for the string to Jmol.
- // ((org.jmol.Viewer.Viewer) viewer).loadModelFromFile(fullPathName,
- // fileName, null, reader, false, null, null, 0);
- // viewer.openStringInline(string);
- log("cannot load inline in Chimera, yet");
- }
-
- public void mouseOverStructure(int atomIndex, String strInfo)
- {
- // function to parse a mouseOver event from Chimera
- //
- int pdbResNum;
- int alocsep = strInfo.indexOf("^");
- int mdlSep = strInfo.indexOf("/");
- int chainSeparator = strInfo.indexOf(":"), chainSeparator1 = -1;
-
- if (chainSeparator == -1)
- {
- chainSeparator = strInfo.indexOf(".");
- if (mdlSep > -1 && mdlSep < chainSeparator)
- {
- chainSeparator1 = chainSeparator;
- chainSeparator = mdlSep;
- }
- }
- // handle insertion codes
- if (alocsep != -1)