[gmx-users] line input of dimensions for box margin plot VMD
Jennifer Rendell
rendell at cs.mun.ca
Tue Jan 30 13:08:38 CET 2007
Dear friends,
I recently posted a tcl script created by Chris Neale of U Toronto for
drawing a very nice box margin plot in VMD. I made a few changes to allow
the box dimensions to be input each time the script is called.
1. Here is the script, call it drawbox.tcl and put in the directory
path/to/script/dir/:
# original script from Chris Neale, U Toronto, 23 January 2007
# altered 25 January 2007 to accept input for the 3 side lengths jmr
puts "input x, y, z dimensions in angstroms each separated by a single space"
set dim [gets stdin]
set vc [split $dim " "]
set x [lindex $vc 0]
set y [lindex $vc 1]
set z [lindex $vc 2]
puts "x length is $x, y length is $y, z length is $z"
draw materials off
draw color white
draw line "0 0 0" "$x 0 0"
draw line "0 0 0" "0 $y 0"
draw line "0 0 0" "0 0 $z"
draw line "$x 0 0" "$x $y 0"
draw line "$x 0 0" "$x 0 $z"
draw line "0 $y 0" "$x $y 0"
draw line "0 $y 0" "0 $y $z"
draw line "0 0 $z" "0 $y $z"
draw line "0 0 $z" "$x 0 $z"
draw line "$x $y 0" "$x $y $z"
draw line "0 $y $z" "$x $y $z"
draw line "$x 0 $z" "$x $y $z"
# end of script
2. add the line
cd path/to/script/dir
to your .vmdrc (linux, unix) or vmd.rc file. (VMD reads this when it
starts up so it know where to look for stuff.)
3. On the command line, type
source drawbox.tcl
Then enter the box dimensions as directed.
J. Rendell
More information about the gromacs.org_gmx-users
mailing list