[chimerax-users] saving multiple .obj files from a morph

Elaine Meng meng at cgl.ucsf.edu
Wed Jun 9 08:02:30 PDT 2021


On Jun 9, 2021, at 3:38 AM, Brett Murrah <murrahx5 at att.net> wrote:

> I’m trying my best to use the perframe command to save each frame / model out from a morph and slider animation after morphing some pdbs.  It is exporting something.. but only 1k files.  I’m not sure what I’m doing wrong.  Any help?   My command is this:
>  
> perframe "save D:/Projects/OBJs/model$1.obj model #3.$1" frames 10
>  
> PS, I put model #3 because the ID’s for 1 and 2 are the models I used for the morphs.  The final morph is #3.   If I export each slider frame by hand.. that seems to work.  Trying to automate it best I can.
>  
> Thanks you for any help!
> Brett


Hi Brett,
I'm guessing you meant to send this to chimerax-users at cgl.ucsf.edu (CC'd here, the recommended address for questions). 

The morph #3 is a trajectory model. It does not have the frames as submodels #3.1, 3.2, ... so your save command doesn't make sense.  I don't know what you mean by "1k files" either... do you mean it makes 10 files but they are too small?

You would use "perframe" in combination with "coordset" to replay the existing morph trajectory. E.g. put something like this into a command file (plain text named something.cxc) and then open it in ChimeraX:

perframe "save D:/Projects/OBJs/model$1.obj models #3"
coordset #3 1,10; wait 10
~perframe

<https://rbvi.ucsf.edu/chimerax/docs/user/commands/coordset.html>
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/perframe.html>
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/save.html>

The reason I say to put it in a command file is to make the commands execute instantly one afer the other.  I expected it to work when I entered them all as one long line in the command line (with semicolon separators) but then I got a parsing error, possibly due to a bug.  E.g. I tried entering this as one long line (the mail tool may choose to break it up):

perframe "save D:/Projects/OBJs/model$1.obj models #3"; coordset #3 1,10; wait 10; ~perframe

... but that gave an "incomplete quoted text" error which I will report as a bug.
I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.                       
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco







More information about the ChimeraX-users mailing list