Communicate between multiple ChimeraX instances

Hi, I wonder if there is a way to synchronize two or more ChimeraX instances/sessions. For example, sync the camera. The meeting command ( https://www.rbvi.ucsf.edu/chimerax/docs/user/commands/meeting.html), a great command I just got to know, is very close to what I am looking for. Only I will have different data in different instances, and toggles to enable and disable what features to be synced. If it is not currently implemented, how should I approach it as a developer? Many thanks, Roden -- This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email.

Hi Roden, Maybe you could use "view matrix" (no arguments) in the session with the view that you want, which would report the matrices of camera and models. Then you could use "view matrix" with "camera" and the camera matrix to set the view in the other session. However, I don't know of any convenient way to do it automatically -- as far as I know, it would be tedious copy and paste. <https://rbvi.ucsf.edu/chimerax/docs/user/commands/view.html#matrix> I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Resource for Biocomputing, Visualization, and Informatics Department of Pharmaceutical Chemistry University of California, San Francisco
On Feb 24, 2025, at 1:20 AM, Roden Deng Luo via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi,
I wonder if there is a way to synchronize two or more ChimeraX instances/sessions. For example, sync the camera.
The meeting command (https://www.rbvi.ucsf.edu/chimerax/docs/user/commands/meeting.html), a great command I just got to know, is very close to what I am looking for. Only I will have different data in different instances, and toggles to enable and disable what features to be synced.
If it is not currently implemented, how should I approach it as a developer?
Many thanks, Roden

Hi Roden, The ChimeraX meeting command is to allow multi-person virtual reality sessions. It is pretty complex, about 3000 lines of code, and is intended to keep everything synchronized, if one person in VR makes a change in their ChimeraX then the others in the session see the same change. It works by sending any ChimeraX command that any person in the session does to the other instances of ChimeraX to run the same command. It is fragile for many reasons and complex (3000 lines of Python code). Another mechanism where one ChimeraX could send another ChimeraX instance a command is using "remotecontrol" https://www.cgl.ucsf.edu/chimerax/docs/user/commands/remotecontrol.html This uses http protocol. ChimeraX can listen on a port like a web server and receive commands from clients (e.g. another ChimeraX or some structure analysis software) to show data or do anything that is possible to do by commands. In general inter-process communication is a pain to implement, does not work very reliably, and is especially difficult for users to manage. So you should have a compelling reason to try to make multiple ChimeraX communicate. You didn't give any indication what the benefit would be. Tom
On Feb 24, 2025, at 1:20 AM, Roden Deng Luo via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi,
I wonder if there is a way to synchronize two or more ChimeraX instances/sessions. For example, sync the camera.
The meeting command (https://www.rbvi.ucsf.edu/chimerax/docs/user/commands/meeting.html), a great command I just got to know, is very close to what I am looking for. Only I will have different data in different instances, and toggles to enable and disable what features to be synced.
If it is not currently implemented, how should I approach it as a developer?
Many thanks, Roden
This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email._______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Thanks, Elaine and Tom! I believe I can solve it relatively easily by combining the "view matrix" and the remote control. But this will only allow the client to control the server, not the other way around, unless making a reverse connection. With three windows, this would become complicated. So, I might still take a look into the meeting command. But it is very good to know the remote control command. This relates to "Grid mode and multiple viewports" https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/... I dream of having about 2-4 viewports whose cameras can be toggled to sync. Ideally, each viewport should be able to select a camera and select whether to lock with that camera. I do see the possibility of multiple cameras while reading the code before. The motivation is mainly for comparative analysis. The use case can be analyzing the same structure by different drawing styles, or by showing the whole in one view while hiding some parts in the other. The use case can also be analyzing structures with slight differences after matchmaker. Overlaying the structures is good in some cases, but the occlusion and clutter are often an issue. Tile mode is helpful in some cases already. But it has an issue that the camera perspective is not exactly the same for each tile. Figures with left and right panels showing the same region can be seen in publications. When there are only a few structures and a few left-right images are needed, this can surely be achieved by typing the commands manually. But in the case of analyzing many similar structures (10-100, or even more), an automatic solution would be much better. For my specific case, those many similar structures come from AI-driven protein design workflows. Having only the camera synced would be already great. The rest can be done by the user in different windows, and the rest sometimes are window-specific, too. I think the following would do the job. Branch the meeting command code and rename it to, for example, "CameraSync". Keep only the camera settings and remove all the rest. In addition, it should be better to communicate with a local server instead of a public server. Best, Roden On Mon, Feb 24, 2025 at 11:04 PM Tom Goddard <goddard@sonic.net> wrote:
Hi Roden,
The ChimeraX meeting command is to allow multi-person virtual reality sessions. It is pretty complex, about 3000 lines of code, and is intended to keep everything synchronized, if one person in VR makes a change in their ChimeraX then the others in the session see the same change. It works by sending any ChimeraX command that any person in the session does to the other instances of ChimeraX to run the same command. It is fragile for many reasons and complex (3000 lines of Python code).
Another mechanism where one ChimeraX could send another ChimeraX instance a command is using "remotecontrol"
https://www.cgl.ucsf.edu/chimerax/docs/user/commands/remotecontrol.html <https://urldefense.com/v3/__https://www.cgl.ucsf.edu/chimerax/docs/user/comm...>
This uses http protocol. ChimeraX can listen on a port like a web server and receive commands from clients (e.g. another ChimeraX or some structure analysis software) to show data or do anything that is possible to do by commands.
In general inter-process communication is a pain to implement, does not work very reliably, and is especially difficult for users to manage. So you should have a compelling reason to try to make multiple ChimeraX communicate. You didn't give any indication what the benefit would be.
Tom
On Feb 24, 2025, at 1:20 AM, Roden Deng Luo via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Hi,
I wonder if there is a way to synchronize two or more ChimeraX instances/sessions. For example, sync the camera.
The meeting command ( https://www.rbvi.ucsf.edu/chimerax/docs/user/commands/meeting.html <https://urldefense.com/v3/__https://www.rbvi.ucsf.edu/chimerax/docs/user/com...>), a great command I just got to know, is very close to what I am looking for. Only I will have different data in different instances, and toggles to enable and disable what features to be synced.
If it is not currently implemented, how should I approach it as a developer?
Many thanks, Roden
------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email._______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/ <https://urldefense.com/v3/__https://mail.cgl.ucsf.edu/mailman/archives/list/...>
-- This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email.
participants (3)
-
Elaine Meng
-
Roden Deng Luo
-
Tom Goddard