This prototype page illustrates the the use of the draw command.
lines and planes
load water.xyz;rotate y 20
draw line1 250 (atomno=1) (atomno=2);color $line1 yellow
draw line2 300 $line1 (atomno=3);color $line2 white
draw plane1 300 PLANE (atomno=1) (atomno=2) (atomno=3);color $plane1 green 4. curves, arrows, OFFSET, set picking DRAW, and show DRAW Jmol 10.x.44 introduces the capability to interactively move arrows, curves, points, lines, and planes. This will be further developed. The new coordinates are displayed in the Java console.
load water.xyz;moveto 1.0 130 991 -44 121.7
draw arrow1 arrow {0 0 -.5} {.2 0 -1} (atomno=2) offset {-.5 -0.3 -.5} The OFFSET keyword allows definition based on atoms but with a specified offset so that the arrows do not touch the atoms themselves.
draw curve1 curve {0 0 .8} {-1 1.8 .8} {.5 1.3 .8}
set picking DRAW Drag objects around using the mouse while holding down the SHIFT key; drag single points using the ALT key. When you are done, use show DRAW to see the final placement.
show DRAW
set picking ON 3. axis spinning and rotating
load water.xyz;rotate y 20
draw line1 250 (atomno=1) (atomno=2);color $line1 yellow
draw line2 300 $line1 (atomno=3);color $line2 white
spin $line1 30
spin $line2 30
spin off;rotate $line1 10;
spin off;rotate $line2 10; Note that clicking the end of an axis starts it rotating counterclockwise (shift-left click for clockwise)
rotate $line2 10;
load caffeine.xyz;set picking SPIN 10; #now pick two atoms
set picking spin 30
draw line1 300 (oxygen) (nitrogen);
spin $line1 30
draw line2 300 (atomno=9) (atomno=11);
draw line2 {-2. 0. 0.} {0. 2. 0.};
spin $line2 30
spin off
load caffeine.xyz;set axes 3;select atomno=4;dots on #several new rotate options
rotate
rotate -x
rotate y 10 (atomno=4)
set axesMolecular;set axes on
rotate y 10 molecular (atomno=4)
rotate z 10 molecular (atomno=4)
rotate 20 (atomno=8) (atomno=4)
draw line1 300 (oxygen) (nitrogen)
rotate 10 $line1
set axesMolecular;set axes on
draw line1 {0 0 0} {3 3 0}
rotate 30 {0 0 0} {3 3 0}
rotate 20 molecular # defaults to y axis 2. PERP -- drawing one object perpendicular to another object
load caffeine2.xyz;draw triangle1 150 (atomno=1) (atomno=14) (atomno=15);
draw line1 200 PERP $triangle1
draw line2 PERP 400 (atomno=1) (atomno=14) (atomno=15);
draw plane2 PLANE 400 (atomno=1) (atomno=14) (atomno=15);
draw plane2 2.0 PERP PLANE $line2;color $plane2 blue
draw plane4 2.0 PERP PLANE $line1;color $plane4 blue
draw plane3 2.0 PERP PLANE ROTATE45 $line1;color $plane3 red
draw plane2 2.0 PLANE CROSSED $line1 $line2;color $plane2 blue
draw plane2 2.0 PERP PLANE $line1 REVERSE $line2;color $plane2 blue
draw triangle1 400
draw triangle1;color draw red;draw line2 ;color draw blue
spin $line2 180 60
spin off 1. drawing lines in multiple frames When atom sets are indicated, if multiple models are being displayed with the FRAME command, the lines drawn will be on a per-model basis. Note that this feature is only available for simple drawn lines, not arrows, curves, or arcs.
load cyclohexane_movie.xyz;frame 0;draw line1 250 (atomno=2) (atomno=5);draw line2 200 (atomno=4 or atomno=3) (atomno=1 or atomno=6);
animation on
animation off;spin $line1 30
animation off;spin $line2 30
spin off
animation off
frame next
frame prev
frame play
frame playrev [appletInfo] [animationInfo] [fileName] [fileHeader] [fileContents] [atomList] [atomInfo] [bondInfo] [moleculeInfo] [extractModel] [orientationInfo] [auxiliaryInfo] [transformInfo] [centerInfo] [boundboxInfo] [modelInfo] [polymerInfo] [chainInfo] [shapeInfo] [stateInfo] [reload THIS orientation] monitor: atomPicked fileLoaded fileLoadError frameChanged measurePending measureCompleted measurePicked scriptStarted scriptEcho scriptStatus scriptError scriptMessage scriptTerminated userAction viewerRefreshed newOrientation all none
Decoded: new window