[Chimera-users] MD trajectory play by commandline

Tom Goddard goddard at sonic.net
Tue Jan 14 11:27:31 PST 2014


Hi Inhee,

  I think the "wait 100" command is needed after the "coordset" command because the coordset command does not wait for the 100 frames to be shown before going on to the next command.  This weird behavior is for making animations where you want to start coordset, and maybe start spinning the model at the same time.

	Tom


On Jan 14, 2014, at 11:06 AM, Elaine Meng wrote:

> Dear Inhee Park,
> A big limitation of the "coordset" command is that most formats of MD trajectory would have to be played through entirely using the graphical interface before it would work to use "coordset", as mentioned here:
> 
> <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/coordset.html>
> 
> In other words, probably the frame is not updating when you use coordset.  Another thing that confuses me in your script is the use of "wait".  I don't think it is needed.  Assuming "coordset" is working, I'd use something like
> 
> perframe myhb; coordset #0 1,1000,10
> ~perframe
> 
> Sorry about that limitation.  Maybe someone else can suggest how to use python to play the trajectory.
> Best,
> Elaine
> ----------
> Elaine C. Meng, Ph.D. 
> UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
> Department of Pharmaceutical Chemistry
> University of California, San Francisco
> 
> 
> On Jan 13, 2014, at 5:18 PM, inhee park <ipark.c at gmail.com> wrote:
> 
>> Dear Chimera developers and users:
>> 
>> 
>> I am using Chimera (production version 1.8 (build 38824) 2013-06-07 21:09:20 UTC).
>> 
>> I wanted to process MD trajectories to extract their detailed H-bond information.
>> To do so, I would like to process by script with Hbond.py file.
>> $ chimera --script Hbond.py
>> 
>> #---[Hbond.py] 
>> from chimera import runCommand
>> 
>> # pr trajectory movie
>> with open("metafile", 'w') as m:
>>    meta_input = """amber
>> mypdb.prmtop
>> pr_dry_netcdf.crd
>> """
>>    print >> m, meta_input
>> #
>> runCommand("open movie:metafile")
>> runCommand("alias ^myhb hbond relax true savefile hbond.$1")
>> runCommand("perframe myhb")
>> runCommand("coordset #0 1,1000,10; wait 100")
>> #-----------------------
>> 
>> As I have many MD trajectories to be processed, I was looking for a commandline 
>> in lieu of actually clicking buttons in MD movie GUI to play.
>> I thought that "coordset #0 1,10000,10; wait 100" may operate like automatically 
>> starting the MD movie to load frame 1 to 1000 at every 100 interval.
>> But resulting saved H-bond files contain same information all about the first frame
>> (because graphically displayed was the first frame without any update
>> unless clicking the button in MD movie GUI).
>> 
>> Is there a way to achieve an automatic play via commandline?
>> 
>> Thank you,
>>  inhee park
>> _______________________________________________
>> Chimera-users mailing list
>> Chimera-users at cgl.ucsf.edu
>> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
> 
> 
> _______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
> 





More information about the Chimera-users mailing list