[Chimera-users] session file/HID

Tom Goddard goddard at sonic.net
Mon Feb 25 10:52:05 PST 2013


Hi Matt,

  Here is programming documentation on how to save data in Chimera session files

	http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Examples/Main_SessionSave.html

Basically you register a callback so that when a session save happens your code gets to write whatever Python code it wants into the Chimera session file.  That Python code will be executed when the session is restored.

	Tom


On Feb 24, 2013, at 1:50 PM, "Dougherty, Matthew T"  wrote:

>> What state do you want to save?
> 
> Hi Tom,
> 
> With this combination of HID controls I have jumped from saving 5-10 positions per session file to 200-300.
> Having this number allows me and the researchers to explore various animation scenarios, optimize camera positions, and vet the viz with the researchers.
> 
> One variable I need to keep is a list of position statuses.  What the list contains is a 1 to 1 correspondence with the position list.
> There are three states positions can be in: TBD, keep, and reject.  
> 
> At some point I need to write python extensions for chimera, but if I can delay coding until I have a better conception of my design requirements for such a project, I will be better off.  
> 
> Matthew Dougherty
> National Center for Macromolecular Imaging
> Baylor College of Medicine
> ________________________________________
> From: Tom Goddard [goddard at sonic.net]
> Sent: Tuesday, February 19, 2013 10:56 AM
> To: Dougherty, Matthew T
> Cc: chimera-users at cgl.ucsf.edu
> Subject: Re: [Chimera-users] session file/HID
> 
> Hi Matt,
> 
>  I can send you a bit of Python code for a keyboard shortcut that does savepos using a name pN where N is the next available integer.  If you want to save some state in session files better to make a separate Chimera extension instead of modifying standard_accelerators.py.  I can provide an example of that.  What state do you want to save?  With the above method of choosing the next available savepos name you don't need to save in sessions the last N used since it can be figured out from the existing savepos names which are already saved in sessions.  I'll try to post the example late today, taking cat to vet this morning.
> 
>        Tom
> 
> 
> On Feb 17, 2013, at 10:16 PM, "Dougherty, Matthew T" wrote:
> 
>> I am developing some USB HID midware code utilizing keyboard shortcuts.
>> This is being done using controllermate to generate an organized system of text strings across devices, and corresponding additions in standard_accelerators.py
>> 
>> One thing I need to write is an automated method that will increment keyframe names to be used for savepos.
>> On a more general level, how do I create variables in standard_accelerators.py that willbe saved in the session file, so I can retrieve them at a later session?
>> 
>> thanks,
>> 
>> Matthew Dougherty
>> National Center for Macromolecular Imaging
>> Baylor College of Medicine
>> _______________________________________________
>> 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