From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Sun Nov 30 2008 - 05:46:45 CST

On 11/29/08, Ondrej Marsalek <ondrej.marsalek_at_gmail.com> wrote:
> hello all,
>
> i have the following problem with vmd. i would like to load
> (volumetric) data on the fly, as they won't fit into memory all at
> once. it all works fine using some (python) scripting, except for one
> thing. every time data get loaded, my view position is reset. i have
> not managed to prevent it and i have not managed to restore the
> original view.

i cannot help with python scripting, but if you look at the attached
function that i use to update a dataset from a running simulation,
you can see how to temporarily save and restore the view and zoom
settings around loading data.

>
> if i save all the view parameters, i can restore the view from these
> if i do it "by hand", some time after the data are loaded. if,
> however, i do it in a script just after a call to
> VMD.molecule.add_volumetric or something similar, the view still gets
> reset. my suspicion is that the call to add_volumetric returns
> immediately, loading data in the background a reseting the view at the

again, i don't know much about the python interface, i always
found it a bit awkward to use, somewhat incomplete and painful
to get working (i guess there are some python "believers" around
that can correct me), but there should be some kind of equivalent
to the waitfor all flag that you can use with the mol addfile command
of the tcl interpreter.

(or you can do the writing in tcl right from the beginning...).
cheers,
   axel.

> end. is this the case? is there any way around it?
>
> any help much appreciated, cheers,
> ondrej
>
>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
  Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.