ChimeraX equivalent to "Chimera web data"?

We have a number of web services and tools that generate web data (*.chimerax) files for legacy Chimera. (Typically they load in a PDB file and an alignment and apply some sort of custom view.) What would the equivalent be for ChimeraX? Ben -- ben@salilab.org https://salilab.org/~ben/ "It is a capital mistake to theorize before one has data." - Sir Arthur Conan Doyle

Hi Ben, You could put links to ChimeraX command files (*.cxc) or ChimeraX session files (*.cxs) on your web servers. ChimeraX commands can open URLs ("open https://...") so a command file could fetch data created by the server. The ChimeraX session files are data (in msgpack format). Unlike Chimera 1 files which were executable Python code, the ChimeraX files are much safer (can't execute arbitrary Python). I am not sure if ChimeraX command and session files cover the use cases that Chimera web data files did. Tell me if they don't. Another nice ChimeraX feature is that it has a built-in web browser and if you open a web page in the ChimeraX browser then special links in the page (<a href="cxcmd: open 6lu7">Open protease</a>) can execute code directly in ChimeraX. This is a nice way to do tutorials in ChimeraX where you can click on links to run commands -- there are examples on the ChimeraX tutorials page that do this (https://www.cgl.ucsf.edu/chimerax/tutorials.html <https://www.cgl.ucsf.edu/chimerax/tutorials.html>). Potentially a user could run one of your web services from within the ChimeraX browser and then just click links on your web page to show results. The drawback is that a user is much more likely to want to use the web browser they are used to (Safari, Firefox, Chrome, ...) since those browsers are more polished and robust. For instance I think the ChimeraX browser can't handle logging in to password protected web sites that use a popup window. Tom
On Mar 24, 2020, at 10:51 AM, Ben Webb <ben@salilab.org> wrote:
We have a number of web services and tools that generate web data (*.chimerax) files for legacy Chimera. (Typically they load in a PDB file and an alignment and apply some sort of custom view.) What would the equivalent be for ChimeraX?
Ben -- ben@salilab.org https://salilab.org/~ben/ "It is a capital mistake to theorize before one has data." - Sir Arthur Conan Doyle _______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: http://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users

On 3/24/20 11:43 AM, Tom Goddard wrote:
You could put links to ChimeraX command files (*.cxc) or ChimeraX session files (*.cxs) on your web servers. ChimeraX commands can open URLs ("open https://...") so a command file could fetch data created by the server.
For .cxc files I got stuck at the first hurdle - am I doing something dumb? open https://modbase.compbio.ucsf.edu/modbase-cgi/showfile.cgi?seq_id=16f39f89e31... loads a PDB file from ModBase but displays it in the browser, not in the model window. The help says "The file type can be indicated by suffix, MIME type, or the format option". Suffix here is presumably ".cgi" which doesn't help ChimeraX, and ModBase probably isn't setting a sane MIME type either. So I tried the 'format' keyword: open https://modbase.compbio.ucsf.edu/modbase-cgi/showfile.cgi?seq_id=16f39f89e31... format pdb This says 'Only "None" format can be fetched from https database'. (This is with the 2020-03-08 build. I'll try with the latest if you think this has been fixed in the interim.) For session files I assume you're thinking we would run a copy of ChimeraX on our system and have it generate the session files? I have a passing familiarity with ChimeraX session files, but it seems like it would be a lot of work to generate one containing a simple atomic structure from scratch using non-ChimeraX software. Ben -- ben@salilab.org https://salilab.org/~ben/ "It is a capital mistake to theorize before one has data." - Sir Arthur Conan Doyle

Hi Ben, You can put the word "download" in the "a href" tag to specify it is file for download rather than to show... for example, see link to "test.cxc" in this page, as well as its source: <http://www.cgl.ucsf.edu/home/meng/t1.html> Maybe you are looking at Chimera help? The manual browser configuration instructions in there are probably out of date. On the Download dialog in Firefox, I get a choice "Open with..." and then I can choose the ChimeraX app ... or some browsers show a list of downloads where you click the download of interest, and then get a choice of what app to open it with. I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 24, 2020, at 12:58 PM, Ben Webb <ben@salilab.org> wrote:
On 3/24/20 11:43 AM, Tom Goddard wrote:
You could put links to ChimeraX command files (*.cxc) or ChimeraX session files (*.cxs) on your web servers. ChimeraX commands can open URLs ("open https://...") so a command file could fetch data created by the server.
For .cxc files I got stuck at the first hurdle - am I doing something dumb?
open https://modbase.compbio.ucsf.edu/modbase-cgi/showfile.cgi?seq_id=16f39f89e31...
loads a PDB file from ModBase but displays it in the browser, not in the model window.
The help says "The file type can be indicated by suffix, MIME type, or the format option". Suffix here is presumably ".cgi" which doesn't help ChimeraX, and ModBase probably isn't setting a sane MIME type either. So I tried the 'format' keyword:
open https://modbase.compbio.ucsf.edu/modbase-cgi/showfile.cgi?seq_id=16f39f89e31... format pdb
This says 'Only "None" format can be fetched from https database'. (This is with the 2020-03-08 build. I'll try with the latest if you think this has been fixed in the interim.)
For session files I assume you're thinking we would run a copy of ChimeraX on our system and have it generate the session files? I have a passing familiarity with ChimeraX session files, but it seems like it would be a lot of work to generate one containing a simple atomic structure from scratch using non-ChimeraX software.
Ben -- ben@salilab.org https://salilab.org/~ben/ "It is a capital mistake to theorize before one has data." - Sir Arthur Conan Doyle _______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: http://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users

On 3/24/20 1:05 PM, Elaine Meng wrote:
You can put the word "download" in the "a href" tag to specify it is file for download rather than to show... for example, see link to "test.cxc" in this page, as well as its source: <http://www.cgl.ucsf.edu/home/meng/t1.html>
Maybe I wasn't clear here but I am running these commands from the ChimeraX command line (or putting them in a .cxc file). I am not writing a web page. That 'test.cxc' you reference opens PDB IDs, not https: URLs.
Maybe you are looking at Chimera help?
No, I'm looking at help:user/commands/open.html#url in the ChimeraX browser. Ben -- ben@salilab.org https://salilab.org/~ben/ "It is a capital mistake to theorize before one has data." - Sir Arthur Conan Doyle

Hi Ben, Sorry about that, specifying format with an URL either changed or I misunderstood when it was explained to me! I will remove the text saying the "format" command-line option can be used with an URL. I personally have only used the suffix method with an URL. In the meanwhile, Eric is looking up some things and will be responding further. Best, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 24, 2020, at 1:10 PM, Ben Webb <ben@salilab.org> wrote:
On 3/24/20 1:05 PM, Elaine Meng wrote:
You can put the word "download" in the "a href" tag to specify it is file for download rather than to show... for example, see link to "test.cxc" in this page, as well as its source: <http://www.cgl.ucsf.edu/home/meng/t1.html>
Maybe I wasn't clear here but I am running these commands from the ChimeraX command line (or putting them in a .cxc file). I am not writing a web page. That 'test.cxc' you reference opens PDB IDs, not https: URLs.
Maybe you are looking at Chimera help?
No, I'm looking at help:user/commands/open.html#url in the ChimeraX browser.
Ben

Hi Ben, In the current ChimeraX the only option is to use an URL that ends in “.pdb”. If the ModBase server returned a content-type header (it doesn’t look like it does here), I could put it in the list of mime-types for PDB files, and that would then work. I mentioned awhile back that I was working on a replacement for the Open/Save/DataFormat bundle_info tags. In the replacement scheme, this will be possible by specifying the ‘dataFormat’ keyword, e.g. open long-ass-url data pdb. For technical reasons related to how bundle_info.xml handles data formats, it is not easy to get that to work with the usual ‘format’ keyword. I did try out your URL in the new scheme and (after some fixes of course!) it did work. I should note that the retrieved file is actually in HTML with the PDB data embedded between <PRE> </PRE> tags, so the PDB reader does a lot of complaining about “Bad PDB record <HTML>” and so forth, but the structure does open. Also, the structure has a blank chain ID, which is ugly to use in commands. We anticipate pushing the revised Open/Save/DataFormat out into the daily build in the 5-to-10-day timeframe. Initially, the new framework will use the commands “open2” and “save2” and the normal open/save commands will continue to use the old mechanism and work in the same way as before. The purpose of putting the new scheme out there like that is so that developers can get their bundles to work with the new scheme so that when the changeover actually occurs, those bundles will continue to work. Also, so that the new scheme can get wider testing. --Eric Eric Pettersen UCSF Computer Graphics Lab
On Mar 24, 2020, at 1:27 PM, Elaine Meng <meng@cgl.ucsf.edu> wrote:
Hi Ben, Sorry about that, specifying format with an URL either changed or I misunderstood when it was explained to me! I will remove the text saying the "format" command-line option can be used with an URL.
I personally have only used the suffix method with an URL.
In the meanwhile, Eric is looking up some things and will be responding further. Best, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 24, 2020, at 1:10 PM, Ben Webb <ben@salilab.org> wrote:
On 3/24/20 1:05 PM, Elaine Meng wrote:
You can put the word "download" in the "a href" tag to specify it is file for download rather than to show... for example, see link to "test.cxc" in this page, as well as its source: <http://www.cgl.ucsf.edu/home/meng/t1.html>
Maybe I wasn't clear here but I am running these commands from the ChimeraX command line (or putting them in a .cxc file). I am not writing a web page. That 'test.cxc' you reference opens PDB IDs, not https: URLs.
Maybe you are looking at Chimera help?
No, I'm looking at help:user/commands/open.html#url in the ChimeraX browser.
Ben
_______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: http://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users

On 3/24/20 2:22 PM, Eric Pettersen wrote:
I mentioned awhile back that I was working on a replacement for the Open/Save/DataFormat bundle_info tags. In the replacement scheme, this will be possible by specifying the ‘dataFormat’ keyword, /e.g./ open long-ass-url data pdb.
OK, in that case it's probably easiest for me to wait until that's rolled out.
I should note that the retrieved file is actually in HTML with the PDB data embedded between <PRE> </PRE> tags, so the PDB reader does a lot of complaining about “Bad PDB record <HTML>” and so forth, but the structure does open.
Oh yes, that's right (although I don't recall Chimera ever complaining about it). I should be able to fix that at the server side.
Also, the structure has a blank chain ID, which is ugly to use in commands.
Right, thanks for the reminder! That's probably true for 99% of ModBase structures, but I'll tweak our pipeline for new structures at least. Ben -- ben@salilab.org https://salilab.org/~ben/ "It is a capital mistake to theorize before one has data." - Sir Arthur Conan Doyle

On 3/24/20 2:22 PM, Eric Pettersen wrote:
I mentioned awhile back that I was working on a replacement for the Open/Save/DataFormat bundle_info tags. In the replacement scheme, this will be possible by specifying the ‘dataFormat’ keyword, /e.g./ open long-ass-url data pdb.
I see that in today's daily build this works (albeit with "open2"), great! But I can't open an alignment in the same fashion: open2 equally-long-url data pir complains with "Invalid "dataFormat" argument". open2 equally-long-url data NBRF/PIR gives a syntax error (chimerax/seqalign/parse.py tries to exec "from .io.readNBRF/PIR import read" which isn't valid Python). Is this code still in flux or should I open a bug? Ben -- ben@salilab.org https://salilab.org/~ben/ "It is a capital mistake to theorize before one has data." - Sir Arthur Conan Doyle

That’s really two bugs —(1) ‘dataFormat’ should accept/expect nicknames (like ‘format’ does) while allowing the full name and (2) using the full name should work. I will open a ticket with you on the recipient list so you know when they get fixed. Should be today. —Eric
On Apr 1, 2020, at 11:29 AM, Ben Webb <ben@salilab.org> wrote:
On 3/24/20 2:22 PM, Eric Pettersen wrote:
I mentioned awhile back that I was working on a replacement for the Open/Save/DataFormat bundle_info tags. In the replacement scheme, this will be possible by specifying the ‘dataFormat’ keyword, /e.g./ open long-ass-url data pdb.
I see that in today's daily build this works (albeit with "open2"), great! But I can't open an alignment in the same fashion:
open2 equally-long-url data pir
complains with "Invalid "dataFormat" argument".
open2 equally-long-url data NBRF/PIR
gives a syntax error (chimerax/seqalign/parse.py tries to exec "from .io.readNBRF/PIR import read" which isn't valid Python). Is this code still in flux or should I open a bug?
Ben -- ben@salilab.org https://salilab.org/~ben/ "It is a capital mistake to theorize before one has data." - Sir Arthur Conan Doyle _______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: http://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
participants (4)
-
Ben Webb
-
Elaine Meng
-
Eric Pettersen
-
Tom Goddard