VMD

To generate high-resolution images (increasing the tachyon resolution)

Render the image in tachyon mode. It will produce both *.dat file and *.dat.tga file. Change the resolution in the *.dat file to the desired resolution and re-render it. To re-render use the below command.

Or you can use the next line of code to directly produce the desired resolution (i.e. without changing the dat file).


~/Softwares/vmd-1.9.2/vmd_lib/vmd/tachyon_LINUXAMD64 -aasamples 12 vmdscene.dat -format TARGA -o hi.tga

render Tachyon ${time_fs}.dat "/home/chaitanya/Softwares/vmd-1.9.2/vmd_lib/vmd/tachyon_LINUXAMD64" -res 2400 2400 -aasamples 12 %s -format TARGA -o %s.tga

To execute a tcl script from command line

Many times it is better to script the entire process in Tcl and use VMD as a command parser. For this, we need to use the below.

vmd -dispdev text -eofexit < input.tcl > output.log

OR

vmd -dispdev text < input.tcl > output.log

OR

vmd -dispdev text < input.tcl

To draw a non-orthorhombic box

This is useful, generally, when we want to make good crystal structure figures using VMD. Obviously, there are other important uses ;)

pbc set {27.513 33.268 38.154 90 105.289 90}

where the first 3 numbers are the cell lengths and the next 3 are cell angles.

Get Unbroken molecules

This script is to select unbroken molecules from a supercell. Better ways may exist to directly get the full supercell by wrapping/unwrapping those coordinates. But at this moment, this is what I could achieve.

To grep the C-F bonds dissociated in a trajectory

To generate cube images of many cube files through tcl script

Generate Atom Numbers as Labels for All Atoms


set molid [molinfo top]

label delete Atoms all

set all [atomselect $molid "all"]

set i 0

foreach atom [$all get index] {

label add Atoms "$molid/$atom"

label textformat Atoms $i { %a%i}

#label textoffset Atoms $i {0.04 0.11}

incr i

}

$all delete

The initial deletion of all Atoms labels is there because relabeling of an atom actually hides its label

Write a specific frame from a trajectory file (in xyz format)

animate write xyz {./2000_frame.xyz} beg 2000 end 2000 skip 1 0