How to do flipZ for orientation distribution bild files

Hi All,

I noticed my final map was flipped in Z-direction but I don’t want to re-run the NU refinement job to get the new bild file. Is there a direct way to handle the bild file with the option flipZ (used in the map flip in Z-direction)? Can pyem do that? Thanks in advance!

1 Like

I found from ccpem emails that you had suggested these from your pyem: --invert-hand particles_inv.bild

Is it possible to add --flipZ option in Thanks so much!

That’s what --invert-hand does.

Are you saying the option --invert-hand in is flipZ? In Relion_image_handler I think the option --invert_hand is similar to --flipX.

that’s the idea, so hopefully.

I used your to convert my star file with the option --invert-hand then directly reconstructed a map using relion_reconstruct_mpi, and I found the reconstructed map is the similar to the output map from Relion’s option --invert_hand. Therefore your invert-hand option in is similar to flipX.

I just found the maps are needed to do flipX (similar to flipZ though). So everything should be fine. Thanks!

Hi @donghuachen – glad you got the BILD file working! I just want to clear something up about flipping maps: flipping a 3D object along any axis will produce a result that is a rotated version of flipping along a different axis.

When you “flip” a 3D object, you change its hand. You could imagine this similar to holding a mirror up to the object. Depending on where you hold the mirror, the final orientation of the project might be different, but you could rotate the resulting mirrored object in space to get it to match something flipped along another axis.

You can test this yourself using chimeraX! Load up a map of your choice. In my case, I’ll use a map I reconstructed from EMPIAR 10288.

I’ll flip the map first along the Z axis, using volume flip #1 axis z

Similarly, I’ll flip the first map along the X axis using volume flip #1 axis x

Now, making sure my camera is aligned correctly, I’ll rotate the X-axis flipped map by 180 degrees using view orient; turn y 180 models #3

We see the maps are now perfectly superimposed! You can check the correlation with the command measure correlation #2 inMap #3, which will be 1, meaning they are identical.

They also both have the opposite handedness of the original map.


Hi rposert,
Thanks for clearing it out. One question, which one is better flipZ or flipX to change the handedness? I am asking this because based on Relion, invert_hand (flipX) seems better as it retains symmetry origin as pasted below. Need some clarification here.

–flipX (false) : Flip (mirror) a 2D image or 3D map in the X-direction?
–flipY (false) : Flip (mirror) a 2D image or 3D map in the Y-direction?
–flipZ (false) : Flip (mirror) a 3D map in the Z-direction?
–invert_hand (false) : Invert hand by flipping X? Similar to flipX, but preserves the symmetry origin. Edge pixels are wrapped around.

@donghuachen Rich is right, it is actually pretty easy to rotate the results with the turn command in ChimeraX, hope flipping along X is ok for you.

@rmattoo I see what you mean. The standard flipping operation is just “collating” or reversing a deck of playing cards by dealing out to a new pile. (The cards = volume slices on the given axis). The relion “–invert_hand” option extends this by continuing to cycle cards from the top to the bottom of the new deck, until card intersecting the symmetry origin is back at the same position it was initially. AFAICT the difference is irrelevant for the axial (or “prismatic”) point groups which only have symmetry operators coinciding with the orthogonal axes (Cn, Dn, Sn), but does matter for the polyhedral groups (Tx, Ox, Ix).


Hi all,

Just chiming in that CryoSPARC’s “flip hand” option (in Volume Tools, Homo Reconstruct Only, etc.) causes an inversion through the origin which preserves symmetry axes as well. This is also equivalent to a reflection along any axis, combined with a 180º rotation along that axis. One also could obtain inverted particle orientations, bild files, etc. by running a homogeneous reconstruction with this option enabled.


1 Like

This sounds like the best option to me as it only takes a few minutes and the volume and orientations are ensured to be correctly aligned.