I am writing a program that will visualize a molecular dynamics experiment. The input will be a file with the location of each atom at each timestep. There will be ~100k atoms and ~500 timesteps. Atoms will be represented as spheres. Connections between atoms will be represented by cylinders.
Here are some requirements for the program (in order of importance):
- ability to move, rotate, and zoom to change the image
- ability to make a movie from the positions at various timesteps
- ability to select an atom with the mouse
- ability to create a GUI
- ease of installation on Mac, Windows and Linux.
Can anyone recommend a language, visualization library or method to approach this? Any other thoughts would also be greatly appreciated.
I would suggest to consider ParaView; what you need to do is to save all relevant data in VTK format (the library has functions for that) and you're done. It has excellent post-processing capabilities (such as coloring, transparent particles, animations) and is well-tested.
If this does not seem enough flexible to you, I have some experience with
c++
lib QGLViewer (don't get confused by the.com
, it is free and cross-platform). You need to write OpenGL code for the particles by yourself, which is pretty easy.That said, I know there are several "scene graph engines", which can help you greatly perhaps, but I think other would better comment on that, as I never used them.
FYI this movie was done with Paraview (you find many more examples, for sure), while stuff here is from OpenGL with QGLViewer.
Hmm, I think the spheres will be too overlapped for 100k atoms -- you will see only edges. So, I suggest to use a "bold" dots for atoms and lines for connections -- it will be much faster and allows to see more details.
Formally, MathGL (GPL plotting library) and its front-end UDAV satisfy all yours requirement. However, I'm not sure that it will be fast to draw 100k spheres and cylinders.