VMD-L Mailing List
From: JeJoon Yeon (sonicturbulent_at_gmail.com)
Date: Mon Jul 27 2015 - 12:16:13 CDT
How can I write 'user' field for xyz format files? Does this requires
additional columns in xyz format? Such as
Si 0 0 0 1
O 1 1 1 1
Si 0 0 0 2
Something like this. Or, is there any example xyz file with 'user' field?
Also, I have 10 types of atoms in the xyz file that I want to visualize in
different colors and size. Does VMD supports user1 ~ user10 or more number
of user field?
2015-07-27 0:05 GMT-04:00 Axel Kohlmeyer <akohlmey_at_gmail.com>:
> On Sun, Jul 26, 2015 at 11:17 PM, JeJoon Yeon <sonicturbulent_at_gmail.com>
> > Hello
> > I have a xyz format file, made up of total 1000 frame and 1761 atoms per
> > frame.
> > For the visualization & post processing purpose, I swapped several atom's
> > name to the different kind, to distinguish their position and movement
> > specific conditions.
> > The position and number of those swapping atoms are different among
> > to frames. For example, atom #1 can be swapped in first frame, but atom
> > and #100 can be swapped (while #1 is replaced to original) in the next
> > frame.
> > After the swapping, when I command vmd -xyz file.xyz, something weird
> > happened. I can't see any of swapped atoms. I changed some Si atoms to
> Al or
> > Mg, but none of Al or Mg were detected during entire frames. I changed
> > O atoms to N and F, but only N is visible, no F were detected.
> > More strange thing is, single frame or 10 frame file (which was swapped)
> > looked perfectly okay. I can see all swapped atoms there. However, only
> > frame or 10000 frame files made those problems - swapped Al, Mg, He, F...
> > atoms were not visible.
> > How can I escape from this situation? I really want to show those
> > atoms.
> what you observe is a very normal behavior of VMD. VMD was initially
> conceived for classical MD calculations where the type and
> connectivity of atoms does not change, thus the atom
> names/types/labels/residues/etc. are only loaded for the very first
> frame read.
> if you want to visualize properties that change over the course of the
> trajectory, you have several options:
> - load each frame into a different molecule (i.e. split the
> trajectory) and use the multimol animation plugin to view only one of
> them at a time
> - write a Tcl script that parses the xyz file and stores the special
> atom properties into the "user" field, after it has been read. then
> use the user field value when creating representations
> - same as above, but rather than using a user field, store the type
> information into special lists and then write a Tcl procedure that
> swap atom types as needed when the vmd frame number is changed.
> connect the second proc to the animation loop via the Tcl trace
> - write a script that transforms your .xyz trajectory, so that it is
> properly "padded" that it contains all required atom types in their
> maximal required counts in all frames and then just map the existing
> trajectory to it and place all "empty" atoms at a coordinate that is
> not visible in your visualization (the topotools plugin has a command
> to do something similar on the fly).
> - use a different visualization program that has different performance
> vs. storage tradeoff than VMD
> > Thanks
> 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.