<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Arial, Helvetica, sans-serif;">Hello, </span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt">
<span style="font-family: Arial, Helvetica, sans-serif;">Is there any way I can get a bundle to know that I'm trying to open a file from a certain category (<i>e.g.</i> Molecular structure vs. Molecular trajectory) from the File -> Open... menu?<br>
</span></div>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Arial, Helvetica, sans-serif;">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><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Arial, Helvetica, sans-serif;">So far, I've tried having multiple 'Open' entries in my bundle tags. Here are some relevant tags from my setup.py:</span><br>
<div><span style="font-family: "Courier New", monospace;">"ChimeraX :: DataFormat :: LOG :: Gaussian output file :: Molecular structure :: .log :: :: :: :: :: Gaussian output file :: utf-8",</span><br>
</div>
<div><span style="font-family: "Courier New", monospace;">"ChimeraX :: DataFormat :: LOG trajectory :: Gaussian output trajectory :: Molecular trajectory :: .log :: :: :: :: :: Gaussian output file :: utf-8",</span><br>
</div>
<div><span style="font-family: "Courier New", monospace;">"ChimeraX :: Open :: LOG :: Gaussian output file ::",</span><br>
</div>
<div><span style="font-family: "Courier New", monospace;">"ChimeraX :: Open :: LOG trajectory :: Gaussian output trajectory :: :: coordsets:Bool",</span></div>
<span></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Arial, Helvetica, sans-serif;">My 'open_file' definition line is:</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: "Courier New", monospace;">def open_file(session, path, format_name, coordsets=False):</span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Arial, Helvetica, sans-serif;">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><br>
<div><br>
</div>
<div><span style="font-family: Arial, Helvetica, sans-serif;">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><br>
</div>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Arial, Helvetica, sans-serif;">Thanks,</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Arial, Helvetica, sans-serif;">Tony</span><br>
</div>
</body>
</html>