From: Dudo (
Date: Wed Jan 12 2011 - 06:41:27 CST


I met the same problems with visualization of VTF trajectories as some folks
some time ago (seek in the thread).
I don't know how those guys solved the problem, or how they do visualize
their trajectories.

The thing is, that the VTF pluggin in VMD is most likely malfunctional. It
doesn't work with the default inputs from
their webpage.

Of course, you can use other programs to visualize spheres according to the
coordinates, like Asmira, POV, ...
at this point VMD looks to me however as more straightforward tool, where
you can get your visualization in the fastest way.

So, it appeared to me as a simplest possibility to convert from VTF to other
format, particularly LAMMPSTRJ.
For those, who find this a convenient option, I'm providing the source code
in the attachment.

If you compute trajectories on a cluster and then download the trajectory to
visualize how the structure evolves,
as I do, you can convert the trajectory on that machine.

Hence, in Linux you compile the code:

ifort vtf2lammps.f90

next, rename compilation output file

cp a.out vtf2lammps

make it executable

chmod +x vt*

You may run it by typing


then the program asks for an input file name. It changes its extension to
.lammpstrj so you don't provide a name for an output file.

you may use it also directly as a command with argument

./vtf2lammps [filename]

in the VMD the grains will appear as tiny dots, I don't know why. It works
like this also for the default inputs from the pluggin website.

hence, you just click on the VMD main window, Graphics tab, from the top
menu, Representations,
choose CPK and increase the size of the spheres as you wish.

anyways, for a quick look you don't have to do that. it's sufficient to see,
that polymer is a polymer and e.g. doesn't fall apart.

one more thing, i was not sure about meaning of required inputs for PBC
BOUNDS in the lammps format.

so if you have to correct it, it can be easily done in the source file, and
then please let me know too :-))

Dudo Racko

Ing. Dusan Racko, PhD
Polymer Institute of the Slovak Academy of Sciences
Dubravska cesta 3
845 41 Bratislava, Slovak Republic
tel: +421 2 5477 3448