[gmx-users] Re: the box margin plot in VMD
Jennifer Rendell
rendell at cs.mun.ca
Thu Jan 25 16:52:06 CET 2007
Dear friends,
I have tried the gaussian98 cube format to make a box margin plot in vmd.
It worked, but had problems. Then Chris Neale at U Toronto gave me a tcl
script which works much better. I describe both below in the hopes that
others will be spared frustration!
I use a Mac PowerPC G5 OS X 10.3.9.
Problems with Gaussian98 box margin plot:
See http://www.gromacs.org/pipermail/gmx-users/2007-January/025378.html
for details and instructions.
1. I take the box dimensions for my system from the last line of the gro
file I want to visualise.
2. I put those dimensions into the script box.cube, with these exceptions.
I need to put the origin at the box dimensions (not at 0,0,0) (in
angstoms, of course). And I need to make the x, y, z dimensions twice
what they really are. Both these alterations are needed to have the box
margin line up with my system, ie to have my system *in* the box drawn.
The result is not quite perfect.
A better solution for me: use tcl to draw a box.
1. Make or edit my .vmdrc file (linux, unix) (vmd.rc file for other
systems) by adding the line:
cd path/to/dir_with_script
(windows people may need to type
cd "c:path/to/dir_with_script")
2. Make a file named drawbox.tcl in the above directory with these
contents:
set x your_x_dim_in_ang
set y your_y_dim_in_ang
set z your_z_dim_in_ang
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"
3. start up vmd, and using the command line in terminal, type
source drawbox.tcl
4. Then load the gro file I am interested in. Lo and behold, my system in
beautifully outlined by the box drawn.
Of course, for a system of a different size, my script needs different x,
y, z values.
Jennifer
More information about the gromacs.org_gmx-users
mailing list