[Chimera-users] Scripted registration of a perframe python script

Eric Pettersen pett at cgl.ucsf.edu
Wed Jun 17 11:56:41 PDT 2015

Hi Kersey,
	Even though you are using a Python script, you can still "mix in" regular Chimera commands with the runCommand function, e.g.:

from chimera import runCommand
runCommand("color red :TYR")

This would allow you to put movie recording commands at appropriate places in your script, as well as advancing the trajectory one frame at a time with calls to the "coordset" command.

This way you don't have to muck with the Movie dialog to try to get it to execute a per-frame script.


                        Eric Pettersen
                        UCSF Computer Graphics Lab

On Jun 17, 2015, at 8:54 AM, Kersey Black <kblack at kecksci.claremont.edu> wrote:

> Hi,
> I have been 'opening' a python script file from within Chimera to start a session and 
> in that script I open the MovieDialog manager (mdm) and read in a pdb with 
> a series of models to be viewed as a trajectory.
> That part is working thanks to help from other responses in chimera-users.
> To modify the molecule (color, etc) it seems like 
> the mdm.ensemble.molecule is giving me the access, though that may
> not be the right approach for my needs, because it seems to act on all
> frames.
> What I would like to do, from within this same initial python script, is
> to apply/register a perframe (also in python) script to control things like color on a frame by frame
> basis.  
> I would like to do this as a way of keeping all 
> of the setup in a single script file such that then I just need to record the movie
> manually, or perhaps there is a way to do this also from the script.  
> Thanks much for any help and/or direction to documentation on the python api to the 
> MovieDialog that allows control of these functions.
> Kersey
> _______________________________________________
> 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