From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Tue Apr 23 2013 - 05:58:58 CDT

On Tue, Apr 23, 2013 at 12:44 PM, Gavin Melaugh <g.melaugh_at_ed.ac.uk> wrote:
> Hi Alex,
>
> Bit of a delay on this response. What do you mean by padding the trajectory
> ?

manipulating it so that each frame has the same number of atoms as is
required by VMD, but do it in a way that those "dummy" atoms can be
easily recognized. the script in topotools does this for example:
https://sites.google.com/site/akohlmey/software/topotools/topotools---documentation#TOC-readvarxyz-file-name-

this can be done in different ways and each of these procedures has
some limitations. the method implemented in topotools, does not
preserve the identity of atoms, for example.

> I have a series of xyz files ? Can I piece these together into one
> trajectory file before loading into VMD.

sure.

> If so would recommend a particular format ?

it doesn't matter. the requirement of having the same number of atoms
in each frame of a trajectory is a fundamental issue and independent
of the file format.

axel.

>
>
> Cheers
>
> Gavin
>
> Quoting Axel Kohlmeyer <akohlmey_at_gmail.com> on Fri, 8 Feb 2013 14:53:07
> +0100:
>
>> On Fri, Feb 8, 2013 at 1:55 PM, Gavin Melaugh
>> <gmelaugh_at_staffmail.ed.ac.uk> wrote:
>>>
>>> Hi All,
>>>
>>> I have been using VMD for the last 3 years to analyse trajectories from
>>> molecular simulations.
>>>
>>> Recently I have started a new project looking at the population dynamics
>>> of
>>> bacterial growth. Since I am used to using VMD I was wondering the
>>> following:
>>>
>>> 1) Can I load xyz configuration files into VMD, in which the number of
>>> particles
>>> (bacterial cells) is different in each configuration file.
>>
>>
>> yes and no. it cannot be done directly, but there are workarounds. the
>> simplest is to have the code producing the trajectory changed to "pad"
>> the output with dummies, so that VMD simply sees a constant number of
>> particles. the second is to do this on the fly with a script like the
>> one in here:
>>
>> https://sites.google.com/site/akohlmey/software/topotools/topotools---documentation#TOC-readvarxyz-file-name-
>> finally, you can just split the trajectory and load each frame
>> independently as a VMD molecule and use the multi-molecule animation
>> GUI to toggle between them instead of the main VMD GUI.
>>
>>> 2) Also if 1) can be achieved, is there also a way of defining the radius
>>> of
>>> each individual particle. The output from my simulation gives xyz files
>>> with
>>> the following format
>>>
>>> agent x y z radius
>>> 1
>>> 2
>>> 3
>>
>>
>> again, it is possible, but it would require additional scripting
>> effort. the xyz reader by itself doesn't support different outside of
>> those implied by recognized element names. the xyz reader in the
>> topotools plugin, however, is entirely written in Tcl, so you could
>> easily write something similar or (better yet) write a version that
>> supports the PQR format, which is commonly used.
>> however, there is an additional complication: most atom properties are
>> not per-frame properties and that includes the radius. per-frame data
>> is x,y,z and vx,vy,vz as well as user, user2, user3, and user4. so
>> you'd have to store properties in there and then have a callback
>> hooked into the animation loop to update the radius info from, say,
>> user4.
>>
>>> I can generate movies from the simulations but I just find that I can not
>>> interact with them in the way that I am used to.
>>
>>
>> well, there is only so much that can be done in this regard. any
>> additional flexibility may impact the performance for the more common
>> VMD scenario, where the number and most properties of particles remain
>> constant.
>>
>> axel.
>>
>>> Many Thanks in Advance
>>>
>>> Gavin
>>>
>>> --
>>> The University of Edinburgh is a charitable body, registered in
>>> Scotland, with registration number SC005336.
>>>
>>>
>>
>>
>>
>> --
>> Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0
>> International Centre for Theoretical Physics, Trieste. Italy.
>>
>>
>
>
>
> Dr Gavin Melaugh
> School of Physics and Astronomy
> The University of Edinburgh
> James Clerk Maxwell Building
> Mayfield Road
> Edinburgh
> EH9 3JZ
> Room 1508
> Telephone: +44 (0) 131 651 3456
> email g.melaugh_at_ed.ac.uk
>
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>

--
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com  http://goo.gl/1wk0
International Centre for Theoretical Physics, Trieste. Italy.