git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3551 fit to window (zoom) command for PyMOL
[jalview.git]
/
src
/
jalview
/
ext
/
pymol
/
PymolCommands.java
diff --git
a/src/jalview/ext/pymol/PymolCommands.java
b/src/jalview/ext/pymol/PymolCommands.java
index
1e4885e
..
f382173
100644
(file)
--- 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
{
*/
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<StructureCommandI> COLOR_BY_CHARGE = new ArrayList<>();
private static final StructureCommand COLOUR_BY_CHAIN = new StructureCommand("spectrum", "chain");
private static final List<StructureCommandI> COLOR_BY_CHARGE = new ArrayList<>();
@@
-75,8
+77,9
@@
public class PymolCommands extends StructureCommandsBase
@Override
public StructureCommandI focusView()
{
@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
}
@Override
@@
-313,7
+316,15
@@
public class PymolCommands extends StructureCommandsBase
public StructureCommandI openSession(String filepath)
{
// https://pymolwiki.org/index.php/Load
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");
}
return new StructureCommand("load", filepath, "", "0", "pse");
}
+ @Override
+ public StructureCommandI closeViewer()
+ {
+ // https://pymolwiki.org/index.php/Quit
+ return CLOSE_PYMOL;
+ }
+
}
}