From: Wolf Dapp (wolf.dapp_at_googlemail.com)
Date: Mon Jul 02 2012 - 03:25:22 CDT

Am 29.06.2012 17:26, schrieb Axel Kohlmeyer:
> On Fri, Jun 29, 2012 at 9:57 AM, Wolf Dapp <wolf.dapp_at_googlemail.com> wrote:
>> I also tried using pdb input files instead of xyz files, and put a condition
>> in the (otherwise unused) "occupancy" field, with a boolean comparison, also
>> to no avail.
>>
>> It seems (also from the GUI output, such as coloring by occupancy, and
>> labelling atoms by name) that neither occupancy nor name is updating at all,
>> even though "update every frame" is activated.
>>
>> Is there something I am overlooking or am blatantly doing wrong? Is there a
>> better property to use rather than name or occupancy?
>
> you are overlooking the core of what john has been saying.
> the atom names in all but the first frame will be ignored.
> so your "script magic" will fail. you have two options to
> deal with this:
>
> 1) split your trajectory into separate files and load each file as a
> new molecule.
> you can then use the "Multiple Molecule Animation" and "Clone Representations"
> plugins (Extensions->Visualization) to turn this into some
> visualization close to
> what you seem to expect.
>
> 2) use the script included in the TopoTools plugin:
> http://sites.google.com/site/akohlmey/software/topotools/topotools---documentation#TOC-readvarxyz-file-name-
> this requires you to use an up-to-date VMD package and possibly even manually
> update the topotools plugin from my homepage.
>
> both approaches have benefits and shortcoming and none is perfect
> for your scenario, which is unexpected for the common use case of
> VMD (for which it is optimized).

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... ;-)

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...

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).

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

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.

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
}