How to make a simple cyclindrical (or other shape) mask in Chimera

To make a simple cylindrical mask in Chimera (e.g., to create a focus mask covering the membrane region of a nanodisc):

  1. shape cylinder center 125,125,108 radius 50 height 40 caps true (where the value after center should be the center of where you want the cylinder). Can use a different shape (e.g. sphere, cone, icosahedron or ellipsoid) at this stage if desired.

  2. If necessary, move the cylinder to the center of rotation to adjust position: move cofr model #1

  3. Make a map from the cylinder shape: mask ones #1 fullmap true

  4. Resample the cylinder on the grid of the original map: vop resample #2 ongrid #0 (assuming #2 is the cylinder map, and #0 is your original experimental map, e.g. a consensus refinement)

  5. Filter (using vop gaussian) if desired, adjust the threshold and then convert to a mask using Volume Tools in CryoSPARC or relion_mask_create.

  6. Should get a soft, pill-shaped mask like this:

(Note: These commands are all in Chimera (old version) syntax - I haven’t checked the equivalents in ChimeraX, but it should be straightforward to convert them if desired. If you want a hollow cylinder, e.g to exclude a central membrane protein, just make two such cylindrical volumes, and then subtract one from the other at step 4.).

15 Likes

Hi @olibclarke ,

are you looking to do something like the attached picture?

We designed the DetBelt server for this (https://detbelt.ibcp.fr/). At the time, we only included scripts to make this picture in Pymol, but I guess we should also do it for ChimeraX now.

Let me know if that would be useful for you and we can try to make that happen to its useful for the community.

Best
Vincent

3 Likes

I was under the impression that this was more a tutorial/tip for image processing rather than visualisation, but I didn’t know about the DetBelt server - could be useful! Particularly if it was ChimeraX compatible. :smiley:

yes indeed @rbs_sci , I read too fast. If Oli wants a mask for data processing, it’s better with a script than going through detbelt, which is designed for visualization of the bulk occupied by amphipathic solvents.

I’ll see to make a script for ChimeraX, it would be useful.

1 Like

Yes indeed it was more a tip for making a cylindrical/geometrical mask for image processing, but detbelt looks cool too!!

Cheers
Oli

ChimeraX has the nice volume onesmask command that takes a surface (shape) and generates a mask out of it on the same grid as the volume you’re masking, if anyone is looking to do it in ChimeraX.

https://www.cgl.ucsf.edu/chimerax/docs/user/commands/volume.html#onesmask

3 Likes

similar to what mask ones does in Chimera, no? (just that in that case you need to resample on your experimental map)

I believe it is the same command. Additionally, for ChimeraX, we found that we needed to add an option to the volume onesmask command to make the values in float instead of int. Here is an example command: vol onesmask #2 ongrid #1 fullmap true valuetype float32

4 Likes
  1. shape cylinder center 125,125,108 radius 50 height 40 caps true (where the value after center should be the center of where you want the cylinder). Can use a different shape (e.g. sphere, cone, icosahedron or ellipsoid) at this stage if desired.

In this step - meant to mention that the center value should be in Å. This may have been a little confusing as measure center in Chimera reports a value in voxels, while cofr reports a value in Å.

1 Like