+ @Override
+ public StructureCommandI openSession(String filepath)
+ {
+ // https://www.cgl.ucsf.edu/chimerax/docs/user/commands/open.html#composite
+ // this version of the command has no dependency on file extension
+ return new StructureCommand("open " + filepath + " format session");
+ }
+
+ @Override
+ public StructureCommandI closeViewer()
+ {
+ // https://www.cgl.ucsf.edu/chimerax/docs/user/commands/exit.html
+ return CLOSE_CHIMERAX;
+ }
+
+ @Override
+ public List<StructureCommandI> startNotifications(String uri)
+ {
+ // https://www.cgl.ucsf.edu/chimerax/docs/user/commands/info.html#notify
+ List<StructureCommandI> cmds = new ArrayList<>();
+ cmds.add(new StructureCommand("info notify start models prefix ModelChanged jalview url " + uri));
+ cmds.add(new StructureCommand("info notify start selection jalview prefix SelectionChanged url " + uri));
+ return cmds;
+ }
+
+ @Override
+ public List<StructureCommandI> stopNotifications()
+ {
+ // https://www.cgl.ucsf.edu/chimerax/docs/user/commands/info.html#notify
+ List<StructureCommandI> cmds = new ArrayList<>();
+ cmds.add(STOP_NOTIFY_MODELS);
+ cmds.add(STOP_NOTIFY_SELECTION);
+ return cmds;
+ }
+
+ @Override
+ public StructureCommandI getSelectedResidues()
+ {
+ return GET_SELECTION;
+ }