<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Tony,<div class=""><br class=""></div><div class=""> There is currently not a way to allow the user to choose between two different ways to open a file with the ChimeraX Open File dialog. Ideally you would just choose the file gaussian.log in the Open File dialog and then some new checkbutton options would appear in that dialog "Open as trajectory", "Open optimized structure" (it could even open both). Right now the ChimeraX Open File dialog is not able to show any custom options. The ChimeraX Save File dialog does allow custom options, for instance, when you are saving a session it shows a checkbutton "Include maps". We could allow this with the Open File dialog too but there is a big downside. Currently the Open File dialog uses the native Mac or Windows open dialog. Those don't allow adding options. So to add options we have to switch to a Qt Open dialog which is a poorer user experience. We made that sacrifice because for saving many formats need options (e.g. save PDB needs an option to specify which open PDB model to save).</div><div class=""><br class=""></div><div class=""> Here are a few ideas. You might have open create both the optimized structure model, and the trajectory model. The user can easily close one if they don't want it. Another approach would be have your open_file() routine pop-up a dialog asking whether to open optimized or trajectory. That has the problem that even the open command would ask which is probably annoying since the user can specify what the want in the command. But you could have your coordset option default to None and if it is specified as True or False then the routine does not popup a dialog. A third option is we could make what you were trying work -- if you choose in the Open File dialog the filter to show only Molecular Trajectory formats, then choose your file, then it will open using your trajectory format. Currently the format menu only controls what types of files are shown in the dialog, not how they are opened. I tend to think your registering Gaussian log files as two different formats is a hack that should be avoided -- it is one format, and you just want some options on what is done when it gets opened. In our older program Chimera the Open dialog "File type" menu includes an entry that says "All (ask type)" which pops up a separate dialog after you choose the file and press Open where there is a menu of types to choose from. We could probably add that. That was intended to handle files with a non-standard or ambiguous file suffix. Again I'm not keen on this -- you really want options about how the file is opened, and it will just be confusing for the user if they have to do that by choosing between different file types.</div><div class=""><br class=""></div><div class=""> Maybe we can achieve the best result by allowing custom opening options like the Save File dialog does, only we still use a native Open File dialog and if the user clicks a file that has options it automatically pops up a separate window with the options for that format. Then pressing the Open button on the Open File dialog closes both the open file dialog and the options pane.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Tom</div><div class=""><br class=""></div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Dec 30, 2019, at 2:30 PM, Anthony James Schaefer <<a href="mailto:tony.schaefer@uga.edu" class="">tony.schaefer@uga.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><span style="font-family: Arial, Helvetica, sans-serif;" class="">Hello,<span class="Apple-converted-space"> </span></span><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><span style="font-family: Arial, Helvetica, sans-serif;" class="">Is there any way I can get a bundle to know that I'm trying to open a file from a certain category (<i class="">e.g.</i>Molecular structure vs. Molecular trajectory) from the File -> Open... menu?<br class=""></span></div></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><span style="font-family: Arial, Helvetica, sans-serif;" class="">I'm trying to build a plugin that will allow me to open Gaussian log files in ChimeraX. I'd like to have it open the optimized structure when I go File -> Open... and change the file filter to "Molecular structure files". When I set the file filter to "Molecular trajectory files", I'd like it to open the log file as a trajectory with each frame being one of Gaussian's optimization steps. The file stays the same, I just want to have my 'open_file' method know that it should open the file differently.<span class="Apple-converted-space"> </span></span><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><span style="font-family: Arial, Helvetica, sans-serif;" class="">So far, I've tried having multiple 'Open' entries in my bundle tags. Here are some relevant tags from my setup.py:</span><br class=""><div class=""><span style="font-family: "Courier New", monospace;" class="">"ChimeraX :: DataFormat :: LOG :: Gaussian output file :: Molecular structure :: .log :: :: :: :: :: Gaussian output file :: utf-8",</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">"ChimeraX :: DataFormat :: LOG trajectory :: Gaussian output trajectory :: Molecular trajectory :: .log :: :: :: :: :: Gaussian output file :: utf-8",</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">"ChimeraX :: Open :: LOG :: Gaussian output file ::",</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">"ChimeraX :: Open :: LOG trajectory :: Gaussian output trajectory :: :: coordsets:Bool",</span></div><span class=""></span></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><span style="font-family: Arial, Helvetica, sans-serif;" class="">My 'open_file' definition line is:</span></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><span style="font-family: "Courier New", monospace;" class="">def open_file(session, path, format_name, coordsets=False):</span><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><span style="font-family: Arial, Helvetica, sans-serif;" class="">While I'm testing, I've set up my 'open_file' method to print the arguments that get passed to it. When I use File -> Open..., I can see that 'format_name' is always "Gaussian ouput file" (never "Gaussian output trajectory") and 'coordsets' is always False, regardless of the file filter. When I use the `open` command (`open asdf.log coordsets true`), 'coordsets' is True and 'format_name' is "Gaussian output file".<span class="Apple-converted-space"> </span></span><br class=""><div class=""><br class=""></div><div class=""><span style="font-family: Arial, Helvetica, sans-serif;" class="">I can work with the open command because of the 'coordsets' argument, but I'd like to know if there's something I can do with the File -> Open... menu.<span class="Apple-converted-space"> </span></span><br class=""></div></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><span style="font-family: Arial, Helvetica, sans-serif;" class="">Thanks,</span></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><span style="font-family: Arial, Helvetica, sans-serif;" class="">Tony</span><br class=""></div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">ChimeraX-users mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="mailto:ChimeraX-users@cgl.ucsf.edu" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">ChimeraX-users@cgl.ucsf.edu</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Manage subscription:</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="http://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users</a></div></blockquote></div><br class=""></div></body></html>