VMD-L Mailing List
From: Phelan Jr., Frederick R. Dr. (frederick.phelan_at_nist.gov)
Date: Mon Feb 28 2011 - 21:34:31 CST
- Next message: John Stone: "VMD 1.9 beta 2 posted for download..."
- Previous message: Peter Freddolino: "Re: vmd1.9beta1 namdEnergyPlugin"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Below is an example of a script I wrote to draw geometries, in this case a box. When I run it I get:
draw_box 0 100 0 100 0 100
expected floating-point number but got "$xlo"
If I take away the input arguments and just set values, i.e., set xlo 0, etc., it works fine, so the problem is obviously the args. What am I doing wrong.
Thanks,
Fred
proc draw_box {xlo xhi ylo yhi zlo zhi} {
# Bottom
draw line [list $xlo $ylo $zlo] [list $xhi $ylo $zlo]
draw line [list $xhi $ylo $zlo] [list $xhi $yhi $zlo]
draw line [list $xhi $yhi $zlo] [list $xlo $yhi $zlo]
draw line [list $xlo $yhi $zlo] [list $xlo $ylo $zlo]
# Top
draw line [list $xlo $ylo $zhi] [list $xhi $ylo $zhi]
draw line [list $xhi $ylo $zhi] [list $xhi $yhi $zhi]
draw line [list $xhi $yhi $zhi] [list $xlo $yhi $zhi]
draw line [list $xlo $yhi $zhi] [list $xlo $ylo $zhi]
# Connections
draw line [list $xlo $ylo $zlo] [list $xlo $ylo $zhi]
draw line [list $xhi $ylo $zlo] [list $xhi $ylo $zhi]
draw line [list $xhi $yhi $zlo] [list $xhi $yhi $zhi]
draw line [list $xlo $yhi $zlo] [list $xlo $yhi $zhi]
}
________________________________
Frederick R. Phelan Jr., Ph.D.
Complex Fluids Group
Polymers Division
National Institute of Standards and Technology
________________________________
NIST, Bldg. 224/Rm. A209
100 Bureau Dr., STOP 8542
Gaithersburg, MD 20899-8542
301.975.6761 (VOX)
301.975.4924 (FAX)
Frederick.Phelan_at_nist.gov
My Polymers Home Page<http://www.nist.gov/mml/polymers/complex_fluids/fred-phelan.cfm>
- Next message: John Stone: "VMD 1.9 beta 2 posted for download..."
- Previous message: Peter Freddolino: "Re: vmd1.9beta1 namdEnergyPlugin"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]