[chimera-dev] need some scripts from chimera source code

Thomas Goddard goddard at cgl.ucsf.edu
Mon Jun 22 17:11:11 PDT 2009

There is a Chimera tool called "Values at Atom Positions" which 
interpolates density map values at atom positions and can use those 
values to color the atoms or select only those in high density.  That 
code is all in Python and is a good example of how to interpolate 
density values at specific points.  Look at the Python code in any 
Chimera distribution in


in particular the set_atom_volume_values() routine.  On the Mac this 
file will be in Chimera.app/Contents/Resources/share/AtomDensity.


Eric Pettersen wrote:
> On Jun 19, 2009, at 6:04 PM, ylei at ecs.umass.edu 
> <mailto:ylei at ecs.umass.edu> wrote:
>> Hi all
>> I am working on a project that requiring some program scripts 
>> concerning with
>> 1) Compute Amber Energy Function
>> 2) Read rotamer information from the Dunbrack Backbone-dependent
>> Rotamer library
>> 3) Read in Electron Density Map and get the density value for each 3-D
>> point in the crystal
>> I did check some related python files in the source code folder and
>> can understand them to some extent, but for running these files, some
>> modules (e.g. Chimera, Rotamers) are needed. However, I don't know how
>> to install these modules, or maybe I should recompile Chimera from
>> source code first(If so, then how, because I don't know the procedure
>> either. BTW, my platform is mac osx)?
> Well, Chimera is itself a Python interpreter.  So if you open a Python 
> script (ending in .py) with either File->Open or with the "open" command 
> then Chimera will run that script.  The script can import any of the 
> modules provided by Chimera (e.g. "import chimera" or "import 
> Rotamers").  If you need to run a script without Chimera's interface 
> coming up or need to provide arguments to your script, see the "--nogui" 
> and "--script" arguments (respectively) documented 
> here: http://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/options.html
>> Could someone show me which files I should use for the above mentioned
>> three subjects and what kinds of modules I should install and how?
> For (1), we would need more details.  What are you trying to do? 
>  Compute charges?  Minimize structures?
> For (2) you would use the Rotamers module, probably either the 
> getRotamers function or the useBestRotamers function, depending on your 
> needs.
> For (3) I think we would need a better description of what you are 
> trying to accomplish, but you can certainly open a density map with:
> from chimera import openModels
> density = openModels.open("map_file_name_with_proper_suffix")[0]
> I'm not an expert on how to get the density value at a point, but maybe 
> Tom Goddard from our lab (who wrote the volumetric data code) will chime 
> in on how to do that.
> --Eric
>                         Eric Pettersen
>                         UCSF Computer Graphics Lab
>                         http://www.cgl.ucsf.edu
> ------------------------------------------------------------------------
> _______________________________________________
> Chimera-dev mailing list
> Chimera-dev at cgl.ucsf.edu
> http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev

More information about the Chimera-dev mailing list