Notes on some useful VMD tips
In this note, I will accumulate some VMD tips I find useful. The main purpose of this note is for self convenience but I hope it can be useful for anyone who wander on this page
How to generate VMD .psf
file from LAMMPS data file #
In VMD console, use command cd
to navigate to the directory where the LAMMPS data file is located. Then, run the following command
topo readlammpsdata your_data_file bond
animate write psf your_psf_file
If the command runs successfully, then you should find your .psf
file generated in the directory. To use the .psf
file, first load the generated .psf
file and then load the trajectory file. You should find yourself be able to use the functionalities such as drawing method, coloring method, etc …
Fix certain molecular in the camera when view the trajectory file #
Sometimes, we want to view certain molecular through the trajectory. However, the targeted molecular may diffuse in the simulation box, making the visualization difficult. We want to make the camera focus on the interested molecular. Here is a method to do this.
In Extension-Analysis-RMSD Visualizer Tool
, use molecular you want to focus on as Atom Selection
. Then run ALIGN
. You can watch the trajectory as the molecular you select in the center of the camera now.
Rendering for publication quality image #
To render publication quality image, follow the good practices below
- Load molecular into VMD with your preferred representation
- For each representation, select a material that is fairly diffuse such as the
Diffuse
material, or the AO-optimizedAOShiny
,AOChalky
, orAOEdgy
materials provided in VMD. - Enable ambient occlusion lighting in the Display Settings window as described above.
- Set the
AO Ambient
factor to 1.0, and theAO Direct
factor to 0.8 as an initial starting point. - Render the scene using
File - Render - Tachyon
orTachyonInternal
, or use therender
command to do the same. - Due to the increased computational complexity of rendering the molecule with ambient occlusion lighting, it’s highly recommended to run VMD and Tachyon on a multi-processor or multi-core workstation for best performance.