VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Mar 30 2006 - 17:24:24 CST
- Next message: Amarda Shehu: "special instructions in psfgen for circular proteins?"
- Previous message: Harindar Keer: "script to change representaiton"
- In reply to: Harindar Keer: "script to change representaiton"
- Next in thread: John Stone: "Re: script to change representaiton"
- Reply: John Stone: "Re: script to change representaiton"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi,
Due to the way VMD and Tcl handle events, and in particular due to the
way the scene manipulation commands work (for performance reasons) you
have to do this a little differently than you might expect:
proc mywait { waittime } {
set starttime [clock seconds]
while {[expr [clock seconds] - $starttime < $waittime]} {
}
}
proc myrotate { axis angle step } {
for {set i 0} {$i < $angle} {incr i $step} {
rotate $axis by $step
display update ui
}
}
mol delete all
mol new 1tit
mol delrep 0 top
mol representation Tube 0.4 6
mol color Name
mol selection {protein}
mol material Opaque
mol addrep top
mol rename top {dimer_LGH.pdb}
myrotate y 360 5
mywait 10
mol delrep 0 top
mol representation CPK 1.4 0.5 8 8
mol color Name
mol selection {protein}
mol addrep top
On Thu, Mar 30, 2006 at 02:37:49PM -0800, Harindar Keer wrote:
> Hi,
>
> I am trying to write a script describe biological system in VMD. I am
> trying to do something as following
> i) Load molecule in CPK representation
> ii) rotate it by 360
> ii) And then change representation to VDW after waiting for sometime
> and then to NewCartoon representation.
>
> The issue is all I get to see is NewCartoon representation roataing at
> the end, I tried wait and also waitfor, suggested by John on mailing
> list, it seems to stop the rotation and again start after time.
>
> I used "play" to load following script
>
> mol new {./Desktop/1LGH_A.pdb} type pdb
> mol delrep 0 top
> mol representation Tube 0.4 6
> mol color Name
>
> mol selection {protein}
> mol material Opaque
> mol addrep top
> mol rename top {dimer_LGH.pdb}
> rotate y by 360 5
> wait 10
> mol delrep 0 top
> mol representation CPK 1.4 0.5 8 8
> mol color Name
> mol selection {protein}
> mol addrep top
>
>
>
> Many thanks,
> Harindar
-- 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
- Next message: Amarda Shehu: "special instructions in psfgen for circular proteins?"
- Previous message: Harindar Keer: "script to change representaiton"
- In reply to: Harindar Keer: "script to change representaiton"
- Next in thread: John Stone: "Re: script to change representaiton"
- Reply: John Stone: "Re: script to change representaiton"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]