[chimerax-users] Possible to read a trajectory "lazily" or in the background?

Ben Webb ben at salilab.org
Mon Mar 13 12:14:03 PDT 2023


Am I right in thinking that when reading a trajectory (e.g. .dcd file), 
all requested frames from that trajectory are first read in, after which 
the "coordset" command can be used to work with the trajectory? I am 
reading frames from an RMF file (using the RMF plugin, the "rmf 
readtraj" command) which is quite slow, perhaps a second per frame - 
because RMF stores local coordinates which must be transformed to make 
the global coordinates ChimeraX is using. So if the user asks to read 
100 frames, ChimeraX becomes unresponsive for ~100s, which is not a 
great user experience.

One possible solution would be to read the 100 frames "lazily", e.g. 
just create 100 copies of the active coordset, then when the user writes 
"coordset #1 N" for the first time or scrolls to frame N with "coordset 
slider", read in frame N from the RMF file and overwrite coordset N. 
That way there would be a 1s delay only the first time that frame is 
shown. Is this possible? I see there is an "active coordset changed" 
trigger - perhaps I could attach to that?

Alternatively, is there an API for tools to run long-running processes 
in the background so that the user can work on other things in the 
meantime, or cancel it if it takes too long?

	Ben
-- 
ben at salilab.org                      https://salilab.org/~ben/
"It is a capital mistake to theorize before one has data."
	- Sir Arthur Conan Doyle


More information about the ChimeraX-users mailing list