Difference between revisions of "VMD"
(Created page with "VMD is a molecular visualization program installed on all workstations and clusters. The official documentation can be found [http://www.ks.uiuc.edu/Research/vmd/current/ug/ug...") |
|||
Line 7: | Line 7: | ||
-f -parm7 second_mol.prmtop -rst7 second_mol.rst \ |
-f -parm7 second_mol.prmtop -rst7 second_mol.rst \ |
||
-f -parm7 third_mol.prmtop -crdbox third_mol_1st_frames.crd -crdbox third_mol_2nd_frames |
-f -parm7 third_mol.prmtop -crdbox third_mol_1st_frames.crd -crdbox third_mol_2nd_frames |
||
+ | |||
+ | == Movie Making Tips == |
||
+ | To load all frames in one go, select the file type in the "Determine file type" box, and then the button "load all at once" |
||
+ | will not be greyed out, so you can select it. |
||
+ | |||
+ | vmd movie making seems not work properly with step sizes different from one. The last frame is repeated many times. Instead, the |
||
+ | frames can be selected using sed: |
||
+ | |||
+ | Try extracting frames first with sed: |
||
+ | sed -e '1~66087,+62939d' path.xyz > temp |
||
+ | 1,+62939d deletes lines 1 to 62940, deleting 20 frames |
||
+ | The ~66087 repeats the action every 21 frames. The counter operates on the original line numbers. This example is for a |
||
+ | system with 3145 atoms, so each frame is 3147 lines with the xyz header. |
||
+ | |||
+ | sed -e '1~Y,+Xd' path.xyz > temp |
||
+ | 1,+Xd deletes lines 1 to X+1, so to select every nth frame for frames of length m you need X=n*m-1 |
||
+ | and Y=(n+1)*m |
||
+ | m is the number of atoms plus two. |
||
+ | |||
Revision as of 08:42, 10 August 2021
VMD is a molecular visualization program installed on all workstations and clusters. The official documentation can be found here with some tutorials here. Like gnuplot however, the wealth of options means that often it takes a long time to find the one command you need to use so below you will find some useful basic settings/info for using VMD. For producing graphics for publication, Pymol is probably a better option as it has a built in ray-tracing routine but for general visualization, VMD is much quicker.
It is possible to load most files using command line flags, making loading many frames into different topology files easy. The -f flag indicates that all subsequent files (until the next -f flag or the end) should be loaded into a single molecule. There are also flags for selecting different file types (default is .pdb), most commonly parm7 for topology files generated by Amber and rst7 for restart files generated by Amber. mdcrd files are denoted -crd and periodic mdcrd files -crdbox.
e.g.
vmd -f first_mol.pdb \ -f -parm7 second_mol.prmtop -rst7 second_mol.rst \ -f -parm7 third_mol.prmtop -crdbox third_mol_1st_frames.crd -crdbox third_mol_2nd_frames
Movie Making Tips
To load all frames in one go, select the file type in the "Determine file type" box, and then the button "load all at once" will not be greyed out, so you can select it.
vmd movie making seems not work properly with step sizes different from one. The last frame is repeated many times. Instead, the frames can be selected using sed:
Try extracting frames first with sed: sed -e '1~66087,+62939d' path.xyz > temp 1,+62939d deletes lines 1 to 62940, deleting 20 frames The ~66087 repeats the action every 21 frames. The counter operates on the original line numbers. This example is for a system with 3145 atoms, so each frame is 3147 lines with the xyz header.
sed -e '1~Y,+Xd' path.xyz > temp 1,+Xd deletes lines 1 to X+1, so to select every nth frame for frames of length m you need X=n*m-1 and Y=(n+1)*m m is the number of atoms plus two.
Tutorials
- using VMD to display and manipulate '.pdb' files
- loading coordinate files into VMD with the help of an AMBER topology file e.g. to visualise the results of a GMIN run using AMBER9
- making movies from a '.pdb' file containing multiple structures. This is dealt with in the OPTIM section as part of the tutorial on making a movie of a path
- visualising normal modes using VMD and OPTIM