thanks. 

suggestion on feature


when exiting session, chimera auto writes out a csv file of model id, name and path. file name equals session name with csv extension. The file could be incorporated into a database.


Would make organizing assets & archiving session files easier.


Matthew Dougherty
National Center for Macromolecular Imaging
Baylor College of Medicine
=================================================
=================================================



From: Eric Pettersen <pett@cgl.ucsf.edu>
Sent: Friday, October 9, 2015 5:37 PM
To: Dougherty, Matthew T
Cc: chimera-users@cgl.ucsf.edu
Subject: Re: [Chimera-users] python/model panel
 

On Oct 9, 2015, at 1:34 PM, Dougherty, Matthew T <matthewd@bcm.edu> wrote:

I would like to print out the model ID, name and input files as they are listed in the model panel.

Can you point me in the direction of how to loop over the model panel ?
Such as elevant variables, and what would be a block of code in chimera that I should study. 

Hi Matt,
I don’t know that you need to go through the Model Panel per se, you could just go through Chimera’s open models list:

chimera.openModels.list()


Each model in the list has:

id ID number
subid Sub-ID number (None if it doesn’t have a sub-ID)
name Name
openedAs If it came from a file, a 4-tuple of stuff you mostly don’t care about, but the first element is the file name

Since some models don’t come from files (e.g. on-the-fly VRML models), you may want to use the model panel’s “inputPath” function to always get a usable/readable string:

from ModelPanel import inputPath
path = inputPath(model)

—Eric

Eric Pettersen
UCSF Computer Graphics Lab