In this note, I will accumulate some VMD tips I ﬁnd 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 ﬁle from LAMMPS data ﬁle
In VMD console, use command
cd to navigate to the directory where the LAMMPS data ﬁle 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 ﬁnd your
.psf ﬁle generated in the directory. To use the
.psf ﬁle, ﬁrst load the generated
.psf ﬁle and then load the trajectory ﬁle. You should ﬁnd yourself be able to use the functionalities such as drawing method, coloring method, etc …
Fix certain molecular in the camera when view the trajectory ﬁle
Sometimes, we want to view certain molecular through the trajectory. However, the targeted molecular may diffuse in the simulation box, making the visualization difﬁcult. We want to make the camera focus on the interested molecular. Here is a method to do this.
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
Diffusematerial, or the AO-optimized
AOEdgymaterials provided in VMD.
- Enable ambient occlusion lighting in the Display Settings window as described above.
- Set the
AO Ambientfactor to 1.0, and the
AO Directfactor to 0.8 as an initial starting point.
- Render the scene using
File - Render - Tachyonor
TachyonInternal, or use the
rendercommand 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.