From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Mon Jul 02 2012 - 05:10:50 CDT

On Mon, Jul 2, 2012 at 10:25 AM, Wolf Dapp <wolf.dapp_at_googlemail.com> wrote:
> Am 29.06.2012 17:26, schrieb Axel Kohlmeyer:
>>
> Hello Axel,
>
> thank you for your reply and thanks for the suggested workarounds.
>
> I see what you mean by "shortcoming" of the multi-molecule animation -- it's
> dreadfully slow... ;-)

performance depends a lot on your graphics card,
its driver and the power of your cpu.

> I'll try your second workaround once I've got the sysadmins to install a
> newer version of VMD.

> I have indeed understood from John's reply that VMD does not update the
> names from xyz input, hence my second questions as to whether there is ANY
> field that is updated in every frame of a trajectory --- besides the obvious
> x, y, and z coordinate. As I've mentioned, I tried "occupancy" for pdb input
> as well, and it didn't seem to work (I'll paste the code I used for that
> below). The "user" field that John suggests seems to be one that is accessed
> every frame, and now I just have to fill it...

right, there is also, vx, vy, vz and user, user2, user3, user4.
outside the coordinates, these are the only fields that can
vary over time, i.e. change from frame to frame.

> I also tried to use the field "beta", as suggested in
> http://www.ks.uiuc.edu/Training/Tutorials/vmd/tutorial-html/node4.html
> That, too, does not seem to get updated (and/or read in at all).

correct.

> Or are you saying that the /radius/ cannot be changed from frame to frame in
> the first place, only from molecule to molecule?

it cannot be updated directly, but if you have the information
stored away in either one of the user fields or in some array,
you can have a little Tcl script being run that will update the
radius data whenever you show a new time step. a few examples
for that are given in this document, check out section 5.
http://sites.google.com/site/akohlmey/redirect/cpmd-vmd.pdf?attredirects=0&d=1

> But even then I should think that the selection would update every frame,
> and not only show the result of the first frame (i.e., $sel num should
> change from frame to fram). That's why I think I'm (also) doing something
> (else) wrong.

an atom selection is only recomputed if you do a: $sel update
this is a feature, not a bug. the selection update is "expensive"
and often not needed.

good luck,
      axel.

> Thanks again,
>
> Wolf Dapp
>
>
> ...... new "script magic" code ..................
>
>
> set num [molinfo top get numframes]
> set sel [atomselect top "occupancy 0"]
>
> mol selupdate 0 0 1
> for {set i 0} {$i < $num} {incr i} {
> puts "frame: [$sel frame], particles in selection0: [$sel num]"
> $sel set radius 0.5
>
> }
>
> set num [molinfo top get numframes]
> set sel [atomselect top "beta < 1"]
>
> mol selupdate 0 0 1
> for {set i 0} {$i < $num} {incr i} {
> puts "frame: [$sel frame], particles in selection0: [$sel num]"
> $sel set radius 0.5
> }
>

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