X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fext%2Fpymol%2FPymolCommands.java;h=f3821732593ff532dd1a28a42825668842915784;hb=5450becd429ebedd98ecfbe33192ac474211cdad;hp=1e4885e125c849e3a28db3a6e2017c908eb3ce85;hpb=2dea2608f1b4acefbedaaa88f931080ed882fc71;p=jalview.git diff --git a/src/jalview/ext/pymol/PymolCommands.java b/src/jalview/ext/pymol/PymolCommands.java index 1e4885e..f382173 100644 --- a/src/jalview/ext/pymol/PymolCommands.java +++ b/src/jalview/ext/pymol/PymolCommands.java @@ -22,6 +22,8 @@ import jalview.structure.StructureCommandsBase; */ public class PymolCommands extends StructureCommandsBase { + private static final StructureCommand CLOSE_PYMOL = new StructureCommand("quit"); + private static final StructureCommand COLOUR_BY_CHAIN = new StructureCommand("spectrum", "chain"); private static final List COLOR_BY_CHARGE = new ArrayList<>(); @@ -75,8 +77,9 @@ public class PymolCommands extends StructureCommandsBase @Override public StructureCommandI focusView() { - // TODO what? - return null; + // https://pymol.org/dokuwiki/doku.php?id=command:zoom + // not currently documented on https://pymolwiki.org/index.php/Category:Commands + return new StructureCommand("zoom"); } @Override @@ -313,7 +316,15 @@ public class PymolCommands extends StructureCommandsBase public StructureCommandI openSession(String filepath) { // https://pymolwiki.org/index.php/Load + // this version of the command has no dependency on file extension return new StructureCommand("load", filepath, "", "0", "pse"); } + @Override + public StructureCommandI closeViewer() + { + // https://pymolwiki.org/index.php/Quit + return CLOSE_PYMOL; + } + }