From: Thomas Aldershof (tald574_at_aucklanduni.ac.nz)
Date: Tue Jul 26 2016 - 23:10:44 CDT

Hey John,

I guess my question was how to load these quantities into the user field as
I thought that was what the supplied script was doing.
However it is still taking only the information from the first frame.
I tried following the Axel Kohlmeyer tutorial linked in the original mail.

References to any other tutorials or more specific advice would be greatly
appreciated.

Cheers,
Thom

On 22 July 2016 at 09:54, John Stone <johns_at_ks.uiuc.edu> wrote:

> Hi,
> You can load the extra parameter into one of the time-varying
> per-atom "user" fields rather than the "beta" or other non-time-varying
> per-atom fields. If you then create selection based on the value of "user"
> or color your representations by "user" you should then be able to achieve
> a variety of time-varying representations depending on the per-atom
> time-varying quanities you have in your files. There are a number of
> tutorials with scripting examples that you should be able to refer to,
> I think Axel Kohlmeyer's tutorial is one of the better ones to refer to
> for things of this sort.
>
> Cheers,
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Wed, Jul 20, 2016 at 06:36:21PM +1200, Thomas Aldershof wrote:
> > Hey all,
> >
> > I am fairly new to VMD and am just getting started with TCL scripting.
> > I would like to visualise a phase change from solid to liquid with
> VMD, I
> > already have all necessary information in a xyz trajectory file where
> each
> > atom line has the format:
> > 1 x y z q6
> > Where q6 is the Steinhardt parameter I use to distinguish solid and
> > liquid.
> >
> > I've tried storing the liquid/solid information as the element in a
> new
> > xyz file, liquid/solid = Ag/Au. To do this, I try to follow the
> > [1]A buckyball example in 5.3 of this tutorial, however it still only
> > loads the element information of the first frame and it does not
> > update.A I understand that this is an inherent trait of VMD, but I
> thought
> > one could work around it with scripting.A
> >
> > Is there any way to update the selection/colouring by element or
> > alternatively can I upload the liquid solid information straight from
> the
> > original file with the q6 parameter.
> >
> > Thanks for any help you can provide,
> > Thom
> >
> > p.s. The script file I am using, for reference:
> >
> > # $Id: track_element.vmd$
> > set viewplist {}
> > # Display settings
> > display projection A Orthographic
> > display nearclip set 0.000000
> > display depthcue A off
> > mol new {liqsol_Al6_1.xyz} type xyz waitfor all autobonds off
> > animate goto 0
> > mol delrep 0 top
> > mol representation cpk 0.950000 0.000000
> > mol color UserA
> > mol selection {all}
> > mol material Opaque
> > mol addrep top
> > mol colupdate 0 top 1
> > mol scaleminmax top 0
> > mol representation DynamicBonds 1.600000 0.200000 19.000000
> > mol color userA
> > mol addrep top
> > mol rename top {Wire}
> > set viewpoints([molinfo top]) {{{1.000000 0.000000 0.000000 0.000001}
> > {0.000000 1.000000 0.000000 0.000000} {0.000000 0.000000 1.000000
> > -0.000000} {0.000000 0.000000 0.000000 1.000000}} {{0.975860 -0.027307
> > 0.216693 0.000000} {0.061060 0.986706 -0.150639 0.000000} {-0.209698
> > 0.160234 0.964556 0.000000} {0.000000 0.000000 0.000000 1.000000}}
> > {{0.090228 0.000000 0.000000 0.000000} {0.000000 0.090228 0.000000
> > 0.000000} {0.000000 0.000000 0.090228 0.000000} {0.000000 0.000000
> > 0.000000 1.000000}} {{1.000000 0.000000 0.000000 0.000000} {0.000000
> > 1.000000 0.000000 0.000000} {0.000000 0.000000 1.000000 0.000000}
> > {0.000000 0.000000 0.000000 1.000000}}}
> > lappend viewplist [molinfo top]
> > # done with molecule
> > foreach v $viewplist {
> > A molinfo $v set {center_matrix rotate_matrix scale_matrix
> global_matrix}
> > $viewpoints($v)
> > }
> > unset viewplist
> > # Set selection and obtain liquid solid classification from element
> > set mol top
> > set wire A [atomselect $mol all]
> > set n [ molinfo $mol get numframes ]
> > for {set i 0} {$i < $n} {incr i} {
> > A A $wire frame $i
> > A A set el_list "";
> > A A # Get the element for each atom Au = solid, Ag = liquid.
> > A A foreach el [$wire get {element}] {
> > set sol 0
> > if [ expr { $el == "Au" } ] {
> > set sol 1
> > }
> > lappend el_list $sol;
> > A A }
> > #puts [ llength $el_list ]
> > A A $wire set user $el_list;
> > }
> > animate style loop
> > animate speed 0.8
> > animate forward
> >
> > References
> >
> > Visible links
> > 1. http://www.ks.uiuc.edu/Training/Tutorials/cpmd-vmd.pdf
>
> --
> 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/
>