/*
* https://chemapps.stolaf.edu/jmol/docs/#writemodel
*/
- return new StructureCommand("write STATE \"" + filepath + "\"");
+ StructureCommand sc = new StructureCommand("write STATE \"" + filepath + "\"");
+ sc.setWaitNeeded(true);
+ return sc;
}
@Override
return new StructureCommand(
"load FILES \"" + Platform.escapeBackslashes(file) + "\"");
}
+ @Override
+ public StructureCommandI restoreSession(String filePath)
+ {
+ return new StructureCommand(
+ "restore STATE \"" + Platform.escapeBackslashes(filePath) + "\"");
+ }
+ @Override
+ public List<StructureCommandI> showHetatms(List<String> toShow)
+ {
+ // always clear the current hetero cpk display
+
+ StringBuilder sb = new StringBuilder();
+ sb.append("select hetero; cpk off;");
+
+ if (toShow != null && !toShow.isEmpty())
+ {
+ // select what was requested
+ sb.append("select ");
+ boolean or = false;
+ for (String k : toShow)
+ {
+ sb.append(or ? " or " : " ");
+ sb.append(k);
+ or = true;
+ }
+ // and show as
+ sb.append("; cpk;");
+ }
+
+ return Arrays.asList(new StructureCommand(sb.toString()));
+ }
/**
* Obsolete method, only referenced from
* jalview.javascript.MouseOverStructureListener
{
return null; // not an external viewer
}
-
- public StructureCommandI saveState(String label)
- {
- return new StructureCommand("save STATE " + label);
- }
-
- public StructureCommandI restoreState(String label)
- {
- return new StructureCommand("restore STATE " + label);
- }
}