Elaine, 

Hey thank you so much for sending this over! 
With your suggestion, I was able to get a per frame script written that saves all of the files into a folder, and I'm now working on some Python code to extract the right information from those files. 
Thank you so much for your help!

Harrison 

From: Elaine Meng <meng@cgl.ucsf.edu>
Sent: Thursday, July 30, 2020 7:10 PM
To: Helmick, Harrison Dale Brent <hhelmick@purdue.edu>
Cc: chimera-users@cgl.ucsf.edu <chimera-users@cgl.ucsf.edu>
Subject: Re: [Chimera-users] Scripting Question
 
Hi Harrison,
I don't know python so can't speak to that part of your question, but as for the per-frame command script, you can substitute the frame number to write a separate file for each frame.  E.g. the dialog for defining a per-frame Chimera command script has a string, by default <FRAME>, to substitute in for the frame number.

Then your writesel command in the per-frame script could include <FRAME> in the output filename to make a separate one each time, e.g. something like the following plus any other writesel options you want:

writesel /Users/myself/location/helix<FRAME>.txt

If the "Use leading zeroes..." option in that dialog is on, then you'd get frame numbers all the same length, say filenames like helix001.txt, helix002.txt ... helix099.txt, helix100.txt, helix101.txt, etc. in directory /Users/myself/location/

<http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/movie/movie.html#per-frame>
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/writesel.html>

I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.                      
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco


> On Jul 30, 2020, at 10:07 AM, Helmick, Harrison Dale Brent <hhelmick@purdue.edu> wrote:
>
> To the Chimera Team,
>
> Hello, my name is Harrison Helmick, and I am a PhD student in Purdue University's department of food science. I hope that you all are doing well.
> I am interested in developing more relationships between bioinformatic models and end use properties of foods, helping us understand and predict characteristics like emulsification, gelling, denaturation, etc.
> I have been using Chimera to run molecular dynamic simulations, as well as analyze the protein structures and compare those to experimental properties. I'd like to see if there are predictable functional differences based on intermediate steps of denaturation of common seed storage proteins used in food. I have found Chimera to be super interesting and helpful in terms of my learning so far.
> One of the characteristics I'd like to quantify is the change in secondary structure over the course of denaturation. I would like to have a script that returns the number of residues that are identified as the basic secondary structures so that I can graph the relative proportion of these structures of the course of the simulation. I'd also like to see which helices and strands are being degraded first, and I will compare that to their relative surface accessibility.
> The way I have gone about this is to use the Chimera command per frame scripts KSDSSP, sel hex, and writesel to attempt to generate files for each frame. With a short python code, we could loop over the files to see which residue numbers disappear first and the progression of the destruction of helices, strands, etc. I haven't been able to get the dynamic file writing to work though, so I always write over the original file instead of saving it as a new one.
> While I could probably figure out the dynamic file writing, this seems inefficient, and I was wondering if you all had a better script this process.
>
> Thank you,
>
> ​--
> Harrison Helmick
> Graduate Research Assistant, Ross Fellowship
> Kokini Lab, Purdue University
> Philip E. Nelson Hall of Food Science
> 745 Agriculture Mall Dr.
> West Lafayette, IN 47907-2009
> _______________________________________________
> Chimera-users mailing list: Chimera-users@cgl.ucsf.edu
> Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users