Hi Ricardo,

  You can edit the "volume unroll" python code in your ChimeraX to add a print statement to print the inner and outer radius.

open 1080 from emdb
volume unroll #1

> volume emdb 1080 threshold 0.852, unroll inner 11.888949394226074, outer 77.99255294799805

  The python code to modify is in the vopcommand.py file, on Mac, that is in your ChimeraX distribution at

ChimeraX.app/Contents/lib/python3.11/site-packages/chimerax/map_filter/vopcommand.py

Here is what the volume_unroll() Python function looks like

# -----------------------------------------------------------------------------
#
def volume_unroll(session, volumes, inner_radius = None, outer_radius = None, length = None,
              grid_spacing = None, axis = None, center = None, coordinate_system = None,
              subregion = 'all', step = (1,1,1), model_id = None):
    '''Flatten a cylindrical shell within a map.'''
    rv = []
    for v in volumes:
        a, c = axis_and_center(axis, center, coordinate_system, v.position)
        r0, r1, h = parse_cylinder_size(inner_radius, outer_radius, length,
                                        c, a, v, subregion, step)
        gsp = parse_grid_spacing(grid_spacing, v, step)
        from . import unroll
        uv = unroll.unroll_operation(v, r0, r1, h, c, a, gsp,
                                     subregion, step, model_id)
        rv.append(uv)
    return _volume_or_list(rv)

And you could add a print line after the parse_cylinder_size call like this

# -----------------------------------------------------------------------------
#
def volume_unroll(session, volumes, inner_radius = None, outer_radius = None, length = None,
              grid_spacing = None, axis = None, center = None, coordinate_system = None,
              subregion = 'all', step = (1,1,1), model_id = None):
    '''Flatten a cylindrical shell within a map.'''
    rv = []
    for v in volumes:
        a, c = axis_and_center(axis, center, coordinate_system, v.position)
        r0, r1, h = parse_cylinder_size(inner_radius, outer_radius, length,
                                        c, a, v, subregion, step)
        print(f'volume {v.name} threshold {v.maximum_surface_level}, unroll inner {r0}, outer {r1}')
        gsp = parse_grid_spacing(grid_spacing, v, step)
        from . import unroll
        uv = unroll.unroll_operation(v, r0, r1, h, c, a, gsp,
                                     subregion, step, model_id)
        rv.append(uv)
    return _volume_or_list(rv)

Then restart ChimeraX and it will print the radii when you use volume unroll.

Tom


On Apr 27, 2024, at 5:55 AM, Ricardo Righetto via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hi,

We've been using the 'volume unroll' command on a cylindrical structure, and while we do get some very decent results with the defaults, we want to do a systematic comparison with values entered manually for the inner and outer radius.

Specifically, I'd like to know if I can get ChimeraX to report what minimum and maximum radii it is currently using for unrolling the volume?

Currently, all I get in the reply log is this:
volume unroll #1
Opened unrolled SPA_density.mrc as #2, grid size 68,697,492, pixel 1.22,1.2,1.2, shown at step 1, values float32

From the help here it says:
(...) and inner and outer radii r1 and r2 (defaults are 90% of the smallest radius and 110% of the largest radius of the displayed isosurface, respectively, given the cylinder center and axis direction).

Since this is a high-resolution cryo-EM map with many intricate features, it's hard to visually find exactly what are the smallest and largest radii currently displayed at the isosurface. So we'd like to know what ChimeraX is finding by itself and compare it to our measurements.

Any tips are appreciated. Thank you!

--
Ricardo Diogo Righetto
_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/