From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Thu Apr 04 2013 - 02:17:46 CDT

On Wed, Apr 3, 2013 at 10:52 PM, John Stone <johns_at_ks.uiuc.edu> wrote:
> Mark,
> There is an undocumented way to do this, currently by
> specifying an environment variable. As I recall there are some

there is also a way to do this using documented features with a little
add-on tcl script. please find attached a script command, that i per
default hook into my VMD Tcl interpreter that will check the list of
loaded files of the current molecule, delete all frames, and then
reload the last file into the existing visualization. to not disrupt
the visualization, it first stores away the view state and then after
loading will re-apply. it should be straightforward to convert this to
a command loading a new molecule without messing up the view.

axel.

> corner cases that this undocumented mechanism may not handle correctly, but
> you can certainly go ahead and give it a try. You can prevent VMD from
> doing a resetview for the newly loaded molecule by setting an environment
> variable "VMDNODISRUPTHACK", either before running VMD, or within VMD itself
> while its running. In VMD you can set it like this:
> set env(VMDNODISRUPTHACK) 1
>
> To unset, just do:
> unset env(VMDNODISRUPTHACK)
>
> Try that and let me know if you find it useful or not. It has been a long
> time since I looked at that code, so I don't recall what issues it does
> or doesn't have. If it is useful enough as-is, I could consider adding
> a GUI control for it if there are no unexpected problems with it.
>
> Cheers,
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Mon, Apr 01, 2013 at 03:38:11AM +0000, Crosskey, Mark William wrote:
>> Hi,
>>
>>
>>
>> I apologize if this is a dumb question, but I spent a good deal of time
>> searching and reading through the manual and didn't find anything. Does
>> anyone know of a way to disable the "display resetview" command that
>> triggers on loading a new molecule? I have a series of .xyz files with a
>> differing number of atoms, and a script that disables the current file and
>> loads the next one, but the view resets each time a new molecule is
>> loaded.
>>
>>
>>
>> -Mark
>
> --
> NIH Center for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
> http://www.ks.uiuc.edu/Research/vmd/

--
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com  http://goo.gl/1wk0
International Centre for Theoretical Physics, Trieste. Italy.