
Edward Brignole wrote:
Tom,
I have a request for display of the measure volume area tool - can it be moved from "tools" to "features" such that it is displayed in the volume viewer along with color, voxel size, etc. The problem I have is that frequently I have 30 or so volumes to open at once and then need to independently go through them and set density thresholds. It's really a pain to have to select the volume once in the volume viewer and then again select the same volume in the measure tool then go back to the viewer and adjust threshold. After doing this 30 times, you'll find that most of the effort is spent making sure to select the same volume in both menus so that the selected volume that you are adjusting is the same volume being measured.
Thankfully, I did however find a python script that you emailed a year ago that I can steal a few lines out of to adjust the thresholds automatically so that the enclosed surface of each model has the appropriate volume in A^3. BTW, I really like your hidedust.py as well, however once I've executed that script adjusting the threshold in the volume viewer does nothing to the displayed or measured volumes - I'm using the snapshot from a week or so ago.
Ed
Ed Brignole Asturias Lab, CB227 The Scripps Research Institute
Hi Ed, I agree it would be helpful to have a measured volume/area panel in the volume dialog. I'll add that to our requested features list. http://www.cgl.ucsf.edu/chimera/plans.html It still needs to be a separate dialog too because it works on surfaces that are not from volume data (e.g. molecular surfaces). The hidedust.py script hides connected components smaller than a specified volume. But the Measure Volume and Area dialog displays values for the entire surface, hidden or not. So those values don't change. Currently there is no provision in the volume/area measurement to exclude the hidden part of the surface. You also say that changing the contour level does not change the displayed surface. As soon as you change the contour level the whole surface is replaced. The hidedust.py script only acts on the surface that is shown at the time you run it, not on future surfaces, so all the dust should come back. You seem to say this is not what happens in your use. I've attached the hidedust.py script to this email in case you are using a different version. Tom # ----------------------------------------------------------------------------- # Hide connected components of a surface with small enclosed volume. # # Tested with Chimera version 1.2500. Will not work with 1.2470 or earlier. # def hide_small_blobs(p, volume): varray, tarray = p.geometry from numpy import ones, intc mask = ones((len(varray),), intc) from _surface import connected_pieces cplist = connected_pieces(tarray) hid = 0 for vi, ti in cplist: ta = tarray.take(ti, axis = 0) from MeasureVolume import enclosed_volume vol, holes = enclosed_volume(varray, ta) if not vol is None and vol < volume: mask.put(vi, 0) hid += 1 p.setTriangleMaskFromVertexMask(mask) print ('Hid %d of %d connected surface components having volume < %.5g' % (hid, len(cplist), volume)) # ----------------------------------------------------------------------------- # Return all surface pieces if none are selected. # def selected_surface_pieces(): import Surface plist = Surface.selected_surface_pieces() if len(plist) > 0: return plist from chimera import openModels from _surface import SurfaceModel plist = [] for m in openModels.list(modelTypes = [SurfaceModel]): plist.extend(m.surfacePieces) return plist # ----------------------------------------------------------------------------- # volume = 100.0 for p in selected_surface_pieces(): hide_small_blobs(p, volume)
participants (1)
-
Tom Goddard