User Tools

Site Tools


eman2:e2gmm_rigidbody

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
eman2:e2gmm_rigidbody [2026/09/29 22:24] – muyuancheneman2:e2gmm_rigidbody [2026/09/29 23:42] (current) – muyuanchen
Line 48: Line 48:
 e2proclst.py gmm_00/ptcls_03_odd.lst --sym c4 e2proclst.py gmm_00/ptcls_03_odd.lst --sym c4
 </code> </code>
 +
 +Next, make a mask that covers the target domain. This can be done using ''FilterTool'' through the e2display browser. I used ''mask.soft'' and ''mask.auto3d.thresh'', but many other combinations also work. Save the processed map and rename it ''mask_unit1.hdf''.
 +
 +{{:eman2:gmm_trpv_mask.png|focus mask}}
 +
 +Finally, run the acutal GMM-based focused refinement. 
 +
 +<code>
 +e2gmm_refine_iter.py gmm_00/threed_03.hdf --startres 2.5 --initpts r3d_00/threed_00_gmm.txt --maskpp r3d_00/mask.hdf --jax --niter 4 --parallel thread:32 --sym c1 --mask mask_unit1.hdf
 +</code>
 +
 +Compared to the global refinement command, here we start from the existing GMM refinement ''gmm_00'', and provide the focus mask through ''--mask''. The program will run one iteration of alignment with neural network and the rest of iterations with gradient descent. When there are multiple flexible domains for focused refinement, simply make multiple masks and combine them into a 3D volume stack. Then use the volume stack file for the ''--mask'' option. 
 +
 +In the output folder, ''fsc_foc_XX.txt'' reports the FSC curve of the target region. Here although the global resolution reached Nyquist already, the local resolution at CTD is still at 2.7 Å after the GMM-based global refinement. After the focused refinement, the resolution of the domain also reaches Nyquist. 
 +
 +After each iteration, the program align and reconstruct every domain of focus (''threed_XX_YY_even/odd.hdf'', where XX is the iteration number and YY is the index of the focused region), and generate composite maps for even/odd half-sets separetly (''threed_XX_even/odd.hdf''). The ''fsc_masked_xx.txt'' are computed using the composite maps. 
 +
 +{{:eman2:gmm_trpv_focus.png|focus refinement}}
 +
 +Here the subunit of focus is on the right. The second image is a composite map colored by local resolution (blue is better).
 +
 +===== Heterogeneity analysis =====
 +
 +Since the first iteration alignment is done by a neural network, it leaves its latent layer output in the same folder, and we can visualize the dynamic of the system from it. However since we keep strict "gold-standard" data separation, the even/odd half-sets are processed with two different networks independently, and there is currently no way to combine the latent space of two networks. Therefore, we can only visualize the dynamics one half-set at a time. Replace the ''even'' in the following command with ''odd'' to visualize the other half.
 +
 +<code>
 +e2gmm_eval.py --pts gmm_01/mid_01_even.txt --pcaout gmm_01/mid_pca_even.txt --ptclsin gmm_01/ptcls_00_even.lst --ptclsout gmm_01/ptcls_cls_01_even.lst --mode regress --ncls 10 --nptcl 20000 --axis 0 --parallel thread:96
 +</code>
 +
 +To visualize dynamics of the the combined dataset and without the rigid body constraint, you can also run
 +
 +<code>
 +e2gmm_heter_refine.py gmm_01/threed_00.hdf --mask mask_unit1a.hdf --nogoldstandard --model gmm_01/model_03_even.txt --maxres 7
 +</code>
 +
 +Here we use ''gmm_01/threed_00.hdf'' as input so it uses the orientation assignment from GMM-based global refinement.
 +
 +{{:eman2:gmm_trpv_mov0.gif|movement - large}}
 +
 +Finally, we can visualize the more subtle movement within the CTD, after the large scale rigid-body movement has been corrected by the focused refinement. This time run the same ''e2gmm_heter_refine.py'' command, but using the focused alignment orientation from the last iteration. 
 +
 +<code>
 +e2gmm_heter_refine.py gmm_01/threed_04.hdf --mask mask_unit1a.hdf --nogoldstandard --model gmm_01/model_03_even.txt --maxres 7
 +</code>
 +
 +{{:eman2:gmm_trpv_mov1.gif|movement - fine}}
  
  
eman2/e2gmm_rigidbody.txt · Last modified: by muyuanchen