[Chimera-users] find the region around a volume imported from 3V voxelator

Tom Goddard goddard at sonic.net
Wed Sep 15 19:54:04 PDT 2010


  Hi Fabian,

   Elaine's idea #2 could be greatly simplified by changing one line of 
Python code in your Chimera distribution using a text editor.  The one 
added line would add a distance attribute to each atom that is the 
distance from the surface computed by the "ac sd" command.  Then you 
could use the Render/Select by Attribute tool to easily find all atoms 
within an desired range of the surface.  The up-arrow key could then 
extend that selection to full residues.  I tried this out and it worked 
like a charm.

   So if you want to try here's the one line of Python code to add to file

     chimera/share/SurfaceDistance/surfdist.py

in the write_surface_distances() routine:

             atoms[a].distance = d[0]

On a Mac the file would be in 
Chimera.app/Contents/Resources/share/SurfaceDistance.

To see exactly where this goes below is the full routine with the added 
line.  Make sure to indent the line to match the indenting of the 
preceding print statements.  And save the file in plain text format.

After restarting Chimera, open your cavity surface (MRC file) and your 
atomic model, select all atoms of the atomic model, use command "ac sd" 
to compute the distances, then menu Tools / Depiction / Render by 
Attribute and choose the Select tab of that dialog, choose attributes of 
atoms in the dialog, and choose attribute "distance" in the dialog, 
adjust the green bars on the histogram of all atom distances and press 
the Apply button to select atoms with distances between the green bars.

     Tom


def write_surface_distances(atoms, surfaces):

     sdisp = [s for s in surfaces if s.display]
     dshown = False
     for s in sdisp:
         xyz = atom_coordinates(atoms, s.openState.xform)
         dist = distance_to_surface(xyz, s)
         for a,d in enumerate(dist):
             print ('Distance from %s to surface %s'
                    % (atoms[a].oslIdent(), s.name))
             print (' d = %.5g, surface point (%.5g, %.5g, %.5g), side %.0f'
                    % tuple(d))
             atoms[a].distance = d[0]
             from chimera.replyobj import status
             status('d = %.5g' % d[0])
             dshown = True
#        show_line_segments(xyz, dist[1:4])

     if not dshown:
         from chimera.replyobj import status
         status('No displayed surfaces')
         return

> Hi Fabian,
> I agree 3V is a very useful server for viewing pocket and channel volumes in Chimera.
>
> Unfortunately in this situation, the zoning features in Chimera are based on distances to atoms -- you can do something to surface points based on their distance to atom(s) of interest, but not vice versa.  That is, I can't think of any simple way to select all the atoms that are within "X" distance of a surface.  In your case, the surface is an isosurface of the MRC volume data.  I had some ideas, but they may not be good enough...
>
> Idea 1 (did not turn out to be useful):
> Assign local density values from the MRC map to atoms with the "Values at Atom Positions" tool, select only atoms with values above a cutoff with "Select by Attribute".  Unfortunately the map in this case contains only 0 and 1, and none of it overlaps with the atoms, so they are all assigned 0 even if close to the surface.  I thought it might be possible to Gaussian smooth the map, and then use the smoothed-out one in this approach, but it seems nontrivial to figure out the appropriate settings for smoothing .
>
> Idea 2:
> The command "ac sd"  (to use keyboard shortcut "sd" in the command line) will show, in the Reply Log, the distance from every selected atom to the surface.  For each selected atom, you'd get something like this:
> Distance from #0:18.water at O to surface MSMS main surface of 1a0m.pdb
>   d = 2.09, surface point (3.14, -1.28, 7.85), side 1
> <http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/accelerators/alist.html#sddetails>
> Then you could save all those lines to some text file and do postprocessing to find the atoms within some cutoff.  Inconveniences with this approach are: you'd need to write your own little script to do the postprocessing, and there are 2 lines per atom rather than a more convenient single line, and if all atoms were selected, the output is large.  Instead of selecting all atoms for the measurement, you might try to narrow it down first, for example by selecting only those near the volume using the mouse, or by first selecting all alpha-carbons and doing the measurement, then from that output figuring out which full residues to select for a second round of measurements.  Perhaps this output could be processed into an attribute assignment file,
> <http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/defineattrib/defineattrib.html#attrfile>
> which would then allow selecting by value as mentioned above.  Selected atoms can be written out as a list or as a PDB file using the Actions menu or commands (writesel, write).
>
> My only other idea is to take a look at what you get for this structure from Castp (for example, start Chimera, use command: open castp:3dhg) because that method automatically gives the atoms that form each pocket.  However, different methods have different definitions of pockets, and when I tried this there was no pocket that was exactly like what you see from 3V.  Pocket #285 from Castp is the most similar and is the same as about half of the 3V pocket in that channel-004.mrc file.  Castp results are automatically shown in a dialog in Chimera and there are options to select the pocket atoms or pocket+mouth atoms when you choose a row or rows in the dialog.
> <http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/castp.html>
>
> Sorry I didn't have some nicer solutions for this problem,
> Elaine
> ----------
> Elaine C. Meng, Ph.D.
> UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
> Department of Pharmaceutical Chemistry
> University of California, San Francisco
>
>
>
> On Sep 9, 2010, at 11:26 AM, Fabian Glaser wrote:
>
>> Daer chimera team,
>> I am interested in finding a channel in a toluene hydrogenase, and
>> extracting all the residues / atoms surrounding this channel. To do
>> that I calculated the channel itself using the 3V voxelator
>> (http://3vee.molmovdb.org), which produces a volume object that can be
>> imported to chimera. See for example the output page
>> http://3vee.molmovdb.org/viewResults.php?jobid=10sep02.ee6, which
>> provides the file channel-004.mrc.gz, which needs to be first
>> unzipped. When uploaded to chimera the volume is very clear and nice.
>>
>> But I want to find the residues/ atoms that form the channel, one the
>> pdb itself 3DHG.pdb.gz, although the select and zone features seem to
>> not work with the volume object.
>>
>> Any idea how to do that?
>>
>> Thanks a lot,
>>
>> Fabian
>
> _______________________________________________
> 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