From: Adkins, Laura R (adkinsl_at_alfred.edu)
Date: Thu May 12 2011 - 16:04:26 CDT

Axel,

Thank you, this has resolved the issue, and I very much appreciate your help.

For anyone hoping to use a similar technique, I'd like warn against using VMD to convert the input file to XYZ format, as I did. Similar to the unchanging atom names, the XYZ file formed has the same atom ID labels throughout the file, despite the input file having differing labels for different timesteps.

An XYZ conversion script is available in the DLPOLY utilities.

Cheers,
Laura

________________________________________
From: Axel Kohlmeyer [akohlmey_at_gmail.com]
Sent: Thursday, May 12, 2011 2:54 PM
To: Adkins, Laura R
Cc: vmd-l_at_ks.uiuc.edu
Subject: Re: vmd-l: Atom ID/Color change with timesteps

laura,

On Thu, May 12, 2011 at 2:29 PM, Adkins, Laura R <adkinsl_at_alfred.edu> wrote:
> Axel,
>
> This xyz file was created by VMD from my DLPOLY history file, and so I assume the labels just carried over from the previous file.
> I attempted the file after deleting signs and after deleting the charge values in addition to the signs. In both cases, I get the same error.
>
> vmd > topo readvarxyz test4.xyz
> Info) readvarxyz: read in 6 frames requiring 19500 atoms storage.
> Type map: O Te Fe Xe Rn Kr Ne
> Max type counts: 12904 24 72 6388 4 92 16
> can't read "a": no such variable
>
> I've searched the file but can find no instance of the letter "a". I've attached test4.xyz in case there's some other formatting issue.

no, this is not a formatting issue. you are running to a known bug
in the topotools-1.1 plugin that is bundled with VMD 1.9.

i have since fixed the code to better handle atom names with
non-alphanumeric characters. you can download an updated
version of topotools from this page.

http://sites.google.com/site/akohlmey/software/topotools/

axel.

> I also downloaded a few examples of xyz files from your website, chain.xyz and spiral.xyz. For chain, I copy pasted the body several times to create a number of different frames, and for spiral I left it alone, with just one frame.
>
> In both cases, I got the same error.
>
> vmd > topo readvarxyz spiral.xyz
> Info) readvarxyz: read in 1 frames requiring 78 atoms storage.
> Type map: 1
> Max type counts: 78
> can't read "a": no such variable
>
> Thanks again,
>
> Laura
>
>
>
> ________________________________________
> From: Axel Kohlmeyer [akohlmey_at_gmail.com]
> Sent: Thursday, May 12, 2011 12:54 PM
> To: Adkins, Laura R
> Subject: Re: vmd-l: Atom ID/Color change with timesteps
>
> On Thu, May 12, 2011 at 12:19 PM, Adkins, Laura R <adkinsl_at_alfred.edu> wrote:
>> Axel,
>>
>> I'm afraid I'm still hitting some hurdles which I haven't been able to pass.
>>
>> When I attempt your suggestion, I get an error
>> vmd > topo readvarxyz Test6-1.xyz
>> Info) readvarxyz: read in 11 frames requiring 19500 atoms storage.
>> Type map: O2- Te2- Fe2- Xe4+ Rn4+ Kr4+ Ne4+
>> Max type counts: 12904 24 72 6388 4 92 16
>> ERROR) Selection terminated too early
>> ERROR) syntax error
>> atomselect: cannot parse selection text: name Fe2- and index 0 1 2 3 4 5 6 7 8 9 10 1
>>
>> It then goes on to list all the index values up to 19500. I suspect that the max type counts are set from the first timestep and aren't really the largest values. Anything obvious I'm doing wrong?
>
> laura,
>
> your atom names are _very_ unusual since the contain
> the '-' and '+' characters and this is breaking some of the
> tcl code. please try to get of them and then try again.
>
> in the meantime, i will check the varxyz code in topotools
> and have a look if there is a way to "user-proof" the
> type searching against such "unexpected" characters.
>
> more later,
> axel.
>
>>
>> Thanks,
>> Laura
>> ________________________________________
>> From: Axel Kohlmeyer [akohlmey_at_gmail.com]
>> Sent: Wednesday, May 11, 2011 8:58 PM
>> To: Adkins, Laura R
>> Cc: vmd-l_at_ks.uiuc.edu
>> Subject: Re: vmd-l: Atom ID/Color change with timesteps
>>
>> laura,
>>
>> On Wed, May 11, 2011 at 8:17 PM, Adkins, Laura R <adkinsl_at_alfred.edu> wrote:
>>> I apologize if this issue has been addressed previously (in a way accessible to a non-expert programmer) and would be happy to be directed to any previous discussion.
>>>
>>> That said, I'm using VMD to run DLPOLY2 history files, and I've reassigned the names of the atoms in different timesteps to reflect their coordination within the system. For example, some of the oxygen is relabeled as iron in various timesteps of the run. I want these atoms to change color, throughout the trajectory run.
>>>
>>> I've tried using 'update every frame' but it doesn't work. I've tried coloring the atoms by name (first letter of the atom), and element. When I used element, all the atoms were the same color. So I converted the file to XYZ format, and when I used element as the coloring method again, I got diverse colors, as appropriate. Still, the atoms did not change color when the ID changed with the timestep.
>>
>> this has been discussed a lot of times on the list. one of the basic
>> assumptions of VMD is that
>> atoms _don't_ change their name/element/type and so on.
>>
>> if you want to have colors change over the course of a trajectory some
>> tcl script hacking will be required
>> or there may be some limitations as to what can be done or how this
>> can be implemented.
>> since you have generated an .xyz format the "cheapest" approach is
>> probably to use
>>
>> topo readvarxy yourfile.xyz
>>
>> this will read the .xyz file through a tcl script and then make a
>> table of how many atoms of which
>> type will be shown over the whole trajectory and then create an empty
>> system/molecule that can
>> hold all of them at the same time and then reorder the atom positions
>> for each frame to match the
>> defined atoms types. this way changing elements or a changing number
>> of atoms can be handled,
>> however, the downside is, that the order of atoms will change and thus
>> bonds cannot be displayed
>> (unless you use the dynamic bonds representation).
>>
>> other options require some more tcl scripting, for which you find
>> examples discussed here:
>> http://sites.google.com/site/akohlmey/redirect/cpmd-vmd.pdf
>>
>> cheers,
>> axel.
>>
>>>
>>> When I isolate timesteps to input them into VMD separately, the atom colors clearly correlate with the atom identities as they vary, but I'm dealing with 600 frames, and don't relish the task of sorting through the resultant files.
>>>
>>> Thanks,
>>> Laura Adkins
>>> /AdkinsL_at_alfred.edu
>>>
>>>
>>
>>
>>
>> --
>> Dr. Axel Kohlmeyer
>> akohlmey_at_gmail.com http://goo.gl/1wk0
>>
>> Institute for Computational Molecular Science
>> Temple University, Philadelphia PA, USA.
>>
>
>
>
> --
> Dr. Axel Kohlmeyer
> akohlmey_at_gmail.com http://goo.gl/1wk0
>
> Institute for Computational Molecular Science
> Temple University, Philadelphia PA, USA.
>

--
Dr. Axel Kohlmeyer
akohlmey_at_gmail.com  http://goo.gl/1wk0
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.