From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Mar 20 2007 - 20:40:09 CDT

Hi,
  Have you tried taking the "draw delete all" out of both
versions of the script to make sure that they aren't interfering
with each other? Were you running these one at a time or both
concurrently?

  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Mar 20, 2007 at 09:09:06PM -0400, Myunggi Yi wrote:
> Dear VMD users,
>
> I have modified a script from the image-movie tutorial (pore.tcl)
> to display two molecules in a window at the same time.
>
> The following is the script.
> If I add arrows in the second molecule, I can't display any arrows.
> Would you give me a hand?
>
>
> proc enabletrace {} {
> global vmd_frame
> trace variable vmd_frame([molinfo top]) w drawcounter
> }
>
> proc disabletrace {} {
> global vmd_frame
> trace vdelete vmd_frame([molinfo top]) w drawcounter
> }
>
> proc enabletrace2 {} {
> global vmd_frame2
> trace variable vmd_frame(1) w drawcounter2
> }
>
> proc disabletrace2 {} {
> global vmd_frame2
> trace vdelete vmd_frame(1) w drawcounter2
> }
>
> set pore_draw_arrows 0
>
> proc enablearrows {} {
> global pore_draw_arrows
> set pore_draw_arrows 1
> }
>
> proc disablearrows {} {
> global pore_draw_arrows
> set pore_draw_arrows 0
> }
>
> proc vmd_draw_arrow {mol start end} {
> # an arrow is made of a cylinder and a cone
> set end [vecadd $start [vecscale 1.5 [vecsub $end $start]]]
> set coneEnd [vecadd $end [vecscale 0.25 [vecsub $end $start]]]
> graphics $mol cylinder $start $end radius 0.5
> graphics $mol cone $end $coneEnd radius 1.0
> }
>
> proc drawcounter { name element op } {
> global vmd_frame
> global pore_draw_arrows
>
> draw delete all
> draw material Opaque
>
> # Draw the arrows
> if { $pore_draw_arrows } {
> for { set id 1 } { $id < 6 } { incr id } {
> set tmpSel1 [atomselect 0 "segid $id and resid 51 200 and name
> CA" \
>
> frame $vmd_frame([molinfo top])]
> foreach {coorIN coorOUT} [$tmpSel1 get "x y z"] { break }
>
> draw color black
> vmd_draw_arrow top $coorOUT $coorIN
>
> $tmpSel1 delete
> }
> }
> }
>
> proc drawcounter2 { name element op } {
> global vmd_frame2
> global pore_draw_arrows
>
> # draw delete all
> draw material Opaque
>
> # Draw the arrows
> if { $pore_draw_arrows } {
> for { set id 1 } { $id < 6 } { incr id } {
> set tmpSel2 [atomselect 1 "segid $id and resid 51 200 and name
> CA" \
>
> frame $vmd_frame(1)]
> foreach {crdIN crdOUT} [$tmpSel2 get "x y z"] { break }
>
> draw color black
> vmd_draw_arrow 1 $crdOUT $crdIN
>
> $tmpSel2 delete
> }
> }
> }
>
>
> --
> Best wishes,
>
> MYUNGGI YI

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078