I have to make sure that a state can be saved. This means that all
information leading to that state must be available. Typically the way this
is done is to re-read a data file on its way to the ZIP part of the PNGJ
output stream. This involves all data files and the state script.

When a model is loaded from a variable, we have to create and maintain a
data structure to hold that model data so that when/if a PNGJ file is
created, we have it on hand --  it was never "in" a file, and Jmol does not
lay down temporary files. We recreate that data structure  in the  state as
part of a LOAD DATA .... END  command.

Now, if you in memory only are creating binary data structures and loading
them, then these will need to be cached and restored in their entirety.

That's the issue. It's not that we couldn't *load* the data. The issue
would be how to *save* it again. But I can think about it.

By the way,

load xxx.png

doesn't really use the LOAD command -- it switches to the SCRIPT command,
runs the state.spt script, which then loads files from the (cached) PNGJ
data.

So perhaps that is the answer to my own question. In some ways this might
be like how we read data in JSmol from drag-dropped files -- we don't get
the filename; we only get the byte stream. OK, so that might work...

Bob
------------------------------------------------------------------------------
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to