# High-resolution 3D refinement Once a subset of sufficient homogeneity has been selected, one may use the 3D auto-refine procedure in Relion to refine this subset to high resolution in a fully automated manner. This procedure employs the so-called gold-standard way to calculate Fourier Shell Correlation (FSC) from independently refined half-reconstructions to estimate resolution, so that self-enhancing overfitting may be avoided (Scheres & Chen, 2012). Combined with a procedure to estimate the accuracy of the angular assignments (Scheres, 2012) it automatically determines when a refinement has converged. Therefore, this procedure requires very little user input, i.e. it remains objective, and has been observed to yield excellent maps for many data sets. Another advantage is that one typically only needs to run it once, as there are hardly any parameters to optimize. The steps below demonstrate high-resolution refinement.. ## Particle re-extraction In the earlier steps of this tutorial the extracted particles were down sampled so processing steps would run more quickly. This is possible because these early steps do not require very high resolution information. Before we start our high-resolution refinement, we should first re-extract our current set of selected particles with less down-scaling, so that we can potentially go to higher resolution. Select a `RELION extract particles (single particle)` job from the `Extract Particles` section and use the following parameters: ```params HEADER: Inputs Micrograph STAR file:: CtfFind/job003/micrographs_ctf.star NOTE: This is from the precalculated results Re-extract refined particles from a STAR file:: Select/job016/selected_particles.star NOTE: Use the output from your class3D auto selection previous job. Note you might have to scroll down the auto-suggested list of files to find it. HEADER: Extraction Options Particle box size (pix):: 360 NOTE: We will use a larger box, so that de-localised CTF signals can be better modelled. This is important for subsequent CTF refinement. Invert contrast?:: Yes NOTE: This will make white particles. Normalize particles?:: Yes NOTE: We always normalize with Relion. Rescale particles:: Yes Re-scaled size (pixels):: 256 NOTE: To prevent working with very large images, let’s down-sample to a pixel size of 360*0.885/256=1.244Å. This will limit our maximum achievable resolution to 2.5 Å (i.e. 2xNyquist), which is probably enough for such a small data set. N.B. this should always be an even number! Write output in float16?:: Yes NOTE: If set to Yes, this program will write output images in float16 MRC format. This will save a factor of two in disk space compared to the default of writing in float32. Re-extraction options: Reset the refined offsets to zero?:: No NOTE: This would discard the translational offsets from the previous classification runs. Re-center refined coordinates?:: Yes NOTE: This will re-center all the particles according to the aligned offsets from the 3D classification job above. Re-center on X-coordinate (in pix):: 0 NOTE: We want to keep the centre of the molecule in the middle of the box. Re-center on Y-coordinate (in pix):: 0 NOTE: We want to keep the centre of the molecule in the middle of the box. Re-center on Z-coordinate (in pix):: 0 NOTE: We want to keep the centre of the molecule in the middle of the box. HEADER: Running Options NOTE: Number of MPI procs:: 6 ``` Click `RUN` to perform the extraction. The job should take less than 1 min to run, it took 10 seconds on the tested system. Once the job is done, inspect the `RESULTS` tab, it will contain a montage of re-extracted, less downsampled particles. ```{image} ../_static/images/SPA/6_class3dextract_result.png :align: center :scale: 70% ``` ## Rescaling the map Because we have changed the size and pixel size of the extracted particles, we now need to re-scale the best map obtained so far from the `Class3D` job so the map and particles have the same box and pixel size. Under `Map Utilities` create a new `Change map box and pixel size` job: ```params Input map:: Select/job016/selected_class.mrc NOTE: This is the best class that was selected from Class3D/job015 by 3D class auto selection in Select/job016. Rebox the map?:: Yes New box size (px):: 256 Rescale the map?:: Yes Rescaled pixel size:: 1.244 Fix disparities in pixel size precision?:: Yes ``` Click `RUN` to start the job. You can check the map once it’s completed to ensure the correct map was re-scaled. ## Running the auto-refine job Note that at this stage we will incorporate D2 symmetry. From `3D Refinement` Start the `RELION 3D auto-refine (single particle)` job and enter the following: ```params Input images STAR file:: Extract/job017/particles.star NOTE: The re-extracted particles with a larger box and smaller pixel size. Reference map:: ReboxRescale/job018/selected_class_reboxed_rescaled.mrc NOTE: Use the reboxed and rescaled map. Reference mask (optional):: Ref. map is on absolute greyscale?:: No NOTE: Because of the different normalisation of down-scaled images, the rescaled map is no longer on the correct absolute grey scale. Setting this option to No is therefore important and will correct the greyscale in the first iteration of the refinement. Initial low-pass filter (A):: 50 NOTE: We typically start auto-refinements from low-pass filtered maps to prevent bias towards high frequency components in the map, and to maintain the gold-standard of completely independent refinements at resolutions higher than the initial one. Symmetry:: D2 NOTE: We now aim for high-resolution refinement, so imposing symmetry will effectively quadruple the number of particles. Do CTF correction?:: Yes Ignore CTFs until first peak?:: No Mask diameter (A):: 200 Mask individual particles with zeros?:: Yes Angular sampling interval:: 7.5 degrees Local searches from auto-sampling:: 1.8 degrees NOTE: The orientational sampling will only be used in the first few iterations, from there on the algorithm will automatically increase the angular sampling rates until convergence. Therefore, for all refinements with less than octahedral or icosahedral symmetry, we typically use the default angular sampling of 7.5 degrees, and local searches from a sampling of 1.8 degrees. Only for higher symmetry refinements, we use 3.7 degrees sampling and perform local searches from 0.9 degrees. Use finer angular sampling faster?:: Yes NOTE: This will be more aggressive in proceeding with iterations of finer angular sampling faster and therefore speed up the calculations. You might want to check that you’re not losing resolution for this in the later stages of your own processing, but during the initial stages it often does not matter much. HEADER: Compute Options Number of pooled particles:: 30 Pre-read all particles into RAM?:: No Copy particles to scratch directory:: Combine iterations through disc?:: Yes Use GPU acceleration?:: Yes Which GPUs to use:: HEADER: Running options Number of MPI procs:: 3 NOTE: As before, you should set this to one plus the number of GPUs you want to use. 3D refinement jobs require an odd number of MPIs (one master plus an equal number for each half set of images). If you only have 1 GPU, you should still set this value to 3, which will cause the GPU to be shared between both of the worker MPI processes. Number of threads:: 6 ``` On the STFC VM we use 1 GPU, 3 MPI processes (one master, two for the half sets) and as we have 12 CPUs 6 threads (4 per half set). This should take ~11 minutes. Results may vary on your system. You can see the final 3D map and resolution in the `RESULTS` tab. The map should be around 4 Angstroms. ```{image} ../_static/images/SPA/6_3Drefine_result.png :align: center :scale: 70% ``` If you're having trouble viewing the model in Mol*, check out these [solutions](https://ccpem-tutorials.readthedocs.io/en/latest/loading_issues.html). In the `I/O` tab you can see `run_half1_class001_unfil.mrc` which is the first half map from the final iteration of refinement. Also present is `run_class001.mrc` which is the final or full map made from combining both half maps. ```{image} ../_static/images/SPA/6_3Drefine_io.png :align: center :scale: 70% ``` Look at the `LOGS` tab and note that the automated increase in angular sampling is an important aspect of the auto-refine procedure. It is based on signal-to-noise considerations that are explained in Scheres, 2012 (Implementation of a Bayesian…), to estimate the accuracy of the angular and translational assignments. The program will not use finer angular and translational sampling rates than it deems necessary (because it would not improve the results). The estimated accuracies and employed sampling rates, together with current resolution estimates are all stored in the `_optimiser.star` and `_model.star` files and written in the `run.out` file displayed here. ```{image} ../_static/images/SPA/6_3Drefine_log1.png :align: center :scale: 100% ``` ```{image} ../_static/images/SPA/6_3Drefine_log2.png :align: center :scale: 100% ``` In the last iteration the two independent half-reconstructions are joined together, the resolution will typically improve significantly in the last iteration. Because the program will use all data out to Nyquist frequency, this iteration also requires more memory and CPU. ```{image} ../_static/images/SPA/6_3Drefine_log3.png :align: center :scale: 100% ``` ```{image} ../_static/images/SPA/6_3Drefine_log4.png :align: center :scale: 100% ```