Opened 4 years ago

Last modified 4 years ago

#6728 assigned enhancement

Allow opening a session file while keep existing session models

Reported by: Long.Gui@… Owned by: Greg Couch
Priority: moderate Milestone:
Component: Sessions Version:
Keywords: Cc: Eric Pettersen
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Want to be able to merge sessions.

Begin forwarded message:

From: Long Gui via Chimera-users <chimera-users@…>
Subject: [Chimera-users] Questions in ChimeraX comparing with Chimera
Date: April 27, 2022 at 11:25:58 AM PDT
To: Kenji MATSUI via Chimera-users <chimera-users@…>
Reply-To: Long Gui

Dear Chimera users,

I have been recently transferring to ChimeraX from the conventional Chimera and I am currently struggling with two features existing in Chimera but not in ChimeraX.

How could I combine two or several different ChimeraX files? I have been doing in Chimera as I was opening new chimera files by "Files...Open...", this is a window pop-up as the following and if I click "No", the new Chimera will be added to the cold Chimera as the old one was not closed. However, when I performed the similar operation in ChimeraX, there is no such window and the new ChimeraX would REPLACE the old one. I wonder if there is a way (probably using command to open? but I did not find the correct open options.) to open the new ChimeraX without closing the old one?

Change History (5)

comment:1 by Eric Pettersen, 4 years ago

Cc: Eric Pettersen added
Owner: changed from Eric Pettersen to Greg Couch

AFAIK, this is currently impossible because the first thing a session does is call reset() on all the state managers, which will close open tools, models, and whatnot. So the session-restore protocol would have to be revised to make the reset optional. After that, I think it's going to be nightmarish to get in there and prevent model ID collisions before those model IDs are used by any tools. Not sure how that would work.

comment:2 by Eric Pettersen, 4 years ago

I guess the Models object would have to be temporarily modified while the session restore is ongoing to add an offset to requested model IDs?

comment:3 by Greg Couch, 4 years ago

Theoretically, if all that is wanted is the models, then it should be possible to do a non-gui restore into a new session instance and move those models to the current session. For some definition of move. And then delete the new session instance.

comment:4 by Eric Pettersen, 4 years ago

Can you just session1.models.remove() them from one session and session2.models.add() them to the other? I assume you would have to reassign the Model.session attribute of those models.

comment:5 by Eric Pettersen, 4 years ago

Well, I can see this maybe working okay for structures and maybe maps (any arcane chicanery there?), there are certainly some kinds of models where this simple scheme would be problematic. There should only be one global H-bond pseudobond group for instance. The models used by ISOLDE to show violations are probably tracked by data structures that wouldn't be properly updated. Things like that.

Note: See TracTickets for help on using tickets.