From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Tue Jun 23 2015 - 06:53:10 CDT

On Tue, Jun 23, 2015 at 2:12 AM, Kannan Ridings
<krid010_at_aucklanduni.ac.nz> wrote:
> Hi there,
>
> I'm a student trying to get VMD to colour atoms in a nanowire I've simulated
> according to what their q4 or q6 value is.
>
> Say that for some number S, if q6 > S -> gold coloured atom
> And that if q6 < S -> silver coloured atom
>
> I can get VMD to read an xyz file with all the coordinates of the atoms and
> the q4 q6 values too, but I'm not sure how to get started with this.

VMD will read the coordinates, but ignore any additional columns in .xyz files.
so the information you think is there is in fact not there.

you have to either read in those properties via Tcl scripting and then
store them in a suitable property field. for custom data, there are
the fields "user", "user2", "user3" and "user4". those fields can be
then queried in atom selection strings or used for color mapping.

in the case that you describe, you would generate two representations,
set up the coloring for each of them and then change the atom
selection string to either "user < S" or "user > S". alternately, you
can use use the color scheme "Trajectory->User->User".

for more details, please check out the VMD user's guide and then have
a look at the introduction and sections 5.3 and 5.4 of:
https://sites.google.com/site/akohlmey/redirect/cpmd-vmd.pdf?attredirects=0&d=1

axel

>
> Any tips or advice would be great.
>
> Thanks,
> Kannan

-- 
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.