Visualising normal modes using VMD and OPTIM
In order to visualise normal modes in this way - you need to have done a harmonic normal mode analysis of the system using OPTIM. Details on how to do this can be found in the worked example (with input) here. This tutorial will cover two ways of visualising the modes with VMD, and also discuss the other output files generated as part of the process.
Visualising modes from vector.dump using draw_vector.tcl
For this part of the tutorial you need to ensure that you have available a vector.dump file containing the harmonic normal modes and points.final.xyz. These are both produced in the example linked above. Credit for draw_vector.tcl goes to Szilard Fejer (sf344)
WARNING: This process can run into problems for large systems with many degrees of freedom. This is because VMD is extremely bad at freeing up memory after it has been allocated. If you're unsure about how it will cope, you are advised to load individual normal modes manually as will be described.
Preparing the input for VMD
draw_vector.tcl reads in a modified xyz format that contains extra information, the normalised vector components (allowing the plotting of vectors on each atom) and the scaled atomic displacement caused by that mode. Each file contains 11 frames with coordinates upon which the normal mode has been acted an integer number of times between -5 and +5. You require one of these files for each mode, and they are produced for you by a simple Fortran program, visnormodes.f90 that you can download here. There are a few options that you can set at the top of the source and I recommend you at least look at the possibilities before compiling it. Once you are happy, run the program in the directory containing the output from your OPTIM run. You now have everything you need to visualise the modes - here is a brief list of the output files and what they contain:
- mag_histo.P - histogram of scaled atomic displacements for mode P. Gives a measure of mode localisation
- nmode.P.xyz - modified xyz file containing the vector components for mode P and the scaled atomic displacements for 11 frames (see above)
- modefile - file containing commands for drawvector.tcl allowing automatic read in of all modes. This can be edited freely
- partratiovsmode.dat - gnuplot data of the participation ratio vs the mode index. This gives another measure of mode localisation
- partratiovsvibfreq.dat - gnuplot data for participation ratio vs vibrational frequency in wavenumbers
- vibfreqvsmode.dat - gnuplot data for the vibrational frequency in wavenumbers vs the mode index
For this visualisation, we only need the nmode.P.xyz files. modefile is optional. We now have all the data required to visualise the modes!