Thank you very much for your answers.
I didn't try the drag and drop emulation approach, but I confirm the "remotecontrol rest" option at startup works nicely.
and it makes it easy to operate.
Hi Jerome,
We don't have the chimerax --send option to open files in an already running ChimeraX, although we plan on adding it.
I have two ideas for how to do this in current ChimeraX. One is to use the remotecontrol command to tell ChimeraX to accept commands via http. In ChimeraX I enable this with command
remote rest start port 58123
Then http requests can run commands in ChimeraX. The http url can be entered in a web browser or from a script. From a script you could use curl or wget programs, for example,
You could make ChimeraX alway enable http requests by putting the "remote..." command in ChimeraX Settings/Preferences under the Startup tab "Execute these commands at startup".
The other idea I have is simpler but did not work in my test. ChimeraX accepts files dragged and dropped on the application. On macOS (and probably Linux and Windows) I should be able to run a shell command that says drop this file on ChimeraX. On Mac the shell command looks like
% open -a /Applications/ChimeraX.app ~/Downloads/ChimeraX/PDB/1a0m.cif
That worked for starting ChimeraX and showing the first file. But when I run it again to open a different it merely raised ChimeraX and did not open the new file. That is a bug. I've made a bug report for it. I don't know the equivalent commands on Linux and Windows and whether the would work.
Tom