From: Christian Leitold (
Date: Thu Jun 09 2016 - 10:06:55 CDT


I am running VMD 1.9.2 and would like to customize the XYZ file reader
plugin for my needs. I already know how to do this in principle (I
already added support for box information some time ago), however, I
am struggling when it comes to adding support for (optional)
velocities. In the function

read_xyz_timestep(void *mydata, int natoms, molfile_timestep_t *ts)

the coordinates are read and saved to ts->coords[3*i ] for x,
ts->coords[3*i+1] for y etc. Now I thought I could do the same with
ts->velocities, apart from the fact that I have to make sure that the
array is actually allocated first. However, although I can allocate
the array and save the velocities to it, this seems to have no effect
whatsoever, i. e. I still cannot access the velocities when running
VMD with my modified XYZ reader. So my question, what else do I have
to do to make that work? Just to be sure, the modified plugin _is_
properly loaded, so that is not the problem here.