# Finding a molecular dynamics visualization library for C

I asked this question over at stackoverflow, and got blasted for it. I am currently working with legacy MD code written in C that my university uses, and haven't moved to a more modern library like OpenMM or mdcore (even though I fully want to). Right now, our visualization routines are horribly out of date, and I am beginning to require something more advanced to make movies of my simulations.

The current visualization 'library' we use is a combination of OpenGL primitives via 'glew,' and it's X extension. The researcher I work with a lot is in charge of the visualization routines, but here is my question:

Is there a newer, 'easy to use,' visualization library that I can link to that people could recommend? I really need it for showing 3D simulation movies, and being able to do change perspectives, show multiple perspectives, etc, would be awesome. Post processing would also be nice, since I write out binary files containing position information for all the objects in my simulation. What do other people use for molecular dynamics simulations, where you have more than just spheres? I have spheres, cylinders, squiggly lines, etc in the current incarnation.

Have you had a look at VMD?

I used it ages ago to produce movies from simulation snapshots. Way back then, it could read a sequence of PDB files, render them (or generate POV-Ray scripts to raytrace them), and store them as individual images. I then used mencoder to generate MPEG-4 files out of the stills. Those were the days.

I haven't used VMD since, but I can only imagine that it has gotten much, much better. Although it is intimately related to NAMD, if your own simulation can produce PDB files, there should be nothing stopping you from using it.

• I will take a look at VMD, but our code doesn't write .pdb files by default. Maybe I could come up with a way to convert the binary files to the text format in .pdb space, but since we are simulating abstract objects, it really doesn't look like it's quite what I am looking for. Also, I had emailed you about mdcore more recently, and hadn't heard back on some functionality. Just wondering if you were still around. – NuclearAlchemist Sep 19 '13 at 21:52
• VMD can import a large number of input formats, for instance the CHARMM coordinate format and I believe it does XYZs (i.e., an XYZ trajectory) as well but you'd lose your topology information. – Deathbreath Oct 1 '13 at 19:18

Pedro's answer would have been mine. If you want to manage balls and sticks on your own, though, VTK is a modern library for such things.

• I will check this out, as I think that VMD seems to mostly want to simulate the atoms and chains, but I simulate abstract objects instead of individual polymers/atoms. So managing the spheres and sticks on my own is probably the way to go. – NuclearAlchemist Sep 19 '13 at 21:53