import ext.edu.ucsf.rbvi.strucviz2.StructureManager.ModelType;
import jalview.api.AlignmentViewPanel;
import jalview.api.structures.JalviewStructureDisplayI;
-import jalview.bin.Cache;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.PDBEntry;
import jalview.datamodel.SearchResultMatchI;
* Close down the Jalview viewer and listener, and (optionally) the associated
* Chimera window.
*/
+ @Override
public void closeViewer(boolean closeChimera)
{
- getSsm().removeStructureViewerListener(this, this.getStructureFiles());
+ super.closeViewer(closeChimera);
if (closeChimera)
{
chimeraManager.exitChimera();
{
chimeraMonitor.interrupt();
}
- releaseUIResources();
}
/**
*
* @return
*/
- public boolean isChimeraRunning()
+ @Override
+ public boolean isViewerRunning()
{
return chimeraManager.isChimeraLaunched();
}
}
/**
- * Ask Chimera to save its session to the given file. Returns true if
- * successful, else false.
- *
- * @param filepath
- * @return
- */
- public boolean saveSession(String filepath)
- {
- if (isChimeraRunning())
- {
- /*
- * Chimera: https://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/midas/save.html
- * ChimeraX: https://www.cgl.ucsf.edu/chimerax/docs/user/commands/save.html
- */
- String command = getCommandGenerator().saveSession(filepath)
- .getCommand();
- List<String> reply = chimeraManager.sendChimeraCommand(command, true);
- if (reply.contains("Session written"))
- {
- return true;
- }
- else
- {
- Cache.log
- .error("Error saving Chimera session: " + reply.toString());
- }
- }
- return false;
- }
-
- /**
* Ask Chimera to open a session file. Returns true if successful, else false.
* The filename must have a .py (Chimera) or .cxs (ChimeraX) extension for
* this command to work.