[Chimera-users] Reading Chimera source ...?

Tom Goddard goddard at sonic.net
Mon Nov 17 15:37:15 PST 2014


Hi Boris,

Unfortunately Python programming in Chimera is not well documented.  The “sel” variable means Selection, they are defined in chimera/share/selection/__init__.py.  An example using Chimera selections is giving in the chimera-dev mailing list post

	http://plato.cgl.ucsf.edu/pipermail/chimera-dev/2014/001157.html

with Python code

	http://plato.cgl.ucsf.edu/trac/chimera/attachment/wiki/Scripts/atomdist.py

  Tom


On Nov 14, 2014, at 8:27 PM, Boris Steipe wrote:

> Hi -
> 
> I'm new to writing Chimera code; I've started poking around in the sample scripts and the modules but and I find it a bit slow to find my way around. For example I would like to perform some simple calculations on the coordinates of a set of selected atoms, and I see many functions that take a "sel" argument, but I can't seem to find documentation on exactly what that argument is expected to contain, or the function that would return such a selection list (is it even a list) of objects. I'm sure if I spend more time, through trial and error and dir() and grep, I'll eventually figure it out, but I wonder if there isn't a more principled approach - a document on the big picture of how the code is structured, and/or a searchable list of all functions? What's the best strategy to start reading and coding Chimera scripts?
> 
> Thanks!
> Boris
> _______________________________________________
> 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