Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#345 closed defect (fixed)

molmap "balls" option error

Reported by: Elaine Meng Owned by: Tom Goddard
Priority: major Milestone:
Component: Volume Data Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

(using structure 2gbp but I don't think it matters)

molmap strand 4 balls true
Traceback (most recent call last):
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/cmd_line/gui.py", line 167, in execute
cmd.run(cmd_text)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/commands/cli.py", line 2184, in run
results.append(ci.function(session, kw_args))
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/map/molmap.py", line 120, in molmap
display_threshold, model_id, replace, show_dialog, name, session)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/map/molmap.py", line 135, in make_molecule_map
transforms, csys, name)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/map/molmap.py", line 191, in molecule_grid_data
add_balls(grid, xyz, radii, sdev, cutoff_range, tflist)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/map/molmap.py", line 242, in add_balls
transforms = [identity()]
NameError: name 'identity' is not defined

Change History (5)

comment:1 by Tom Goddard, 9 years ago

Resolution: fixed
Status: newclosed

Fixed.

The "balls" option means each atom adds a function that is not a gaussian, but instead is constant with height 1 up to the atom radius then drops off according to the Gaussian that would have been used without the balls option starting at height 1 (gaussian position 0) and decreasing radially. The default cutoff, edge padding, and grid spacing are still relative to the Gaussian standard deviation derived from the resolution. So essentially the "balls" option simply gives the Gaussian a flat top and changes the normalization so that every atom has height 1. I forget why I ever added this option. It is pretty quirky and pretty useless as far as I can see.

comment:2 by Elaine Meng, 9 years ago

It may be useful for analyzing the differences in VDW envelopes of two structures, or for highlighting VDW overlaps like the Fraser group was interested in doing.  E.g. add or subtract the resulting molmaps, contour at some specific level, measure volume enclosed in isosurface, stuff like that.

comment:3 by Elaine Meng, 9 years ago

Maybe a step function would be better than the Gaussian tails for the uses I imagined, however.

comment:4 by Elaine Meng, 9 years ago

Hmm, still fails for me in the current daily build:

molmap :tyr 5 balls true
Traceback (most recent call last):
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/cmd_line/gui.py", line 167, in execute
cmd.run(cmd_text)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/commands/cli.py", line 2184, in run
results.append(ci.function(session, kw_args))
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/map/molmap.py", line 116, in molmap
display_threshold, model_id, replace, show_dialog, name, session)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/map/molmap.py", line 131, in make_molecule_map
transforms, name)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/map/molmap.py", line 184, in molecule_grid_data
add_balls(grid, xyz, radii, sdev, cutoff_range, transforms)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/map/molmap.py", line 234, in add_balls
if len(transforms) == 0:
TypeError: object of type 'NoneType' has no len()

comment:5 by Tom Goddard, 9 years ago

Fixed.

Oops! Friday changes to add symmetry option support in molmap broke it when using the "balls" option and no symmetry.

Note: See TracTickets for help on using tickets.