| 1 |
Pair-distance distribution analysis – DIFT (DENSS IFT) in RAW |
| 2 |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 3 |
.. _dift_tutorial: |
| 4 |
|
| 5 |
The first step in most advanced data processing is to calculate the P(r) function, the |
| 6 |
Fourier transform of I(q). This cannot be calculated directly from the scattering profile, so |
| 7 |
indirect Fourier transform (IFT) methods are typically used. In addition to GNOM and BIFT, |
| 8 |
RAW has another built-in method for calculating the P(r) curve called DIFT. DIFT is the IFT |
| 9 |
calculator from DENSS. It is the same algorithm used in the DENSS command line tool *denss.fit_data.py*. |
| 10 |
DIFT is built into RAW in python and does not require a separate installation of DENSS. |
| 11 |
DIFT works similarly to GNOM, allowing automatic or manual selection of Dmax and alpha, |
| 12 |
though there are important differences described below. |
| 13 |
|
| 14 |
This tutorial covers how to use RAW for doing an IFT. This is not a tutorial |
| 15 |
on basic principles and best practices for doing an IFT or analysis of the |
| 16 |
resulting P(r) function. For that, please see the :ref:`SAXS tutorial <saxs_ift>`. |
| 17 |
|
| 18 |
If you use RAW to run DIFT, in addition to citing the RAW paper, please |
| 19 |
cite the DIFT paper `here. <https://journals.iucr.org/j/issues/2022/05/00/vg5144/>`_ |
| 20 |
|
| 21 |
The written version of the tutorial follows. |
| 22 |
|
| 23 |
#. Right click on the glucose isomerase profile in the Profiles list you loaded |
| 24 |
:ref:`previously <s2p1>`. Select “IFT (DENSS)” from the resulting menu. |
| 25 |
|
| 26 |
* *Note:* RAW will automatically try to find an appropriate maximum dimension (|Dmax|) and |
| 27 |
smoothing parameter (alpha). |
| 28 |
|
| 29 |
|dift_panel_png| |
| 30 |
|
| 31 |
#. The DIFT panel has plots on the right. These show the P(r) function |
| 32 |
(top panel), the data (middle panel, blue points) and the fit line (middle |
| 33 |
panel, red line), and the fit residual (bottom panel). |
| 34 |
|
| 35 |
#. On the left of the DIFT panel are the controls and the resulting parameters. You can alter |
| 36 |
the data range used, the |Dmax| value, and the alpha value used. |
| 37 |
|
| 38 |
* *Note:* Unlike GNOM, in DIFT you cannot select/deselect forcing P(r=0) or P(r=|Dmax|) to zero. |
| 39 |
They are mathematically restricted to zero already. |
| 40 |
|
| 41 |
* *Tip:* The Guinier and P(r) |Rg| and I(0) values should agree well for |
| 42 |
mostly rigid particles. Unlike GNOM, there is no “Total Estimate” for DIFT. |
| 43 |
|
| 44 |
#. Try varying the |Dmax| value up and down in the range of 80-120. Observe what |
| 45 |
happens to the P(r) and the quality of the solution. |
| 46 |
|
| 47 |
#. Return the |Dmax| value to that found by RAW by clicking the "Auto Dmax" button. |
| 48 |
|Dmax| should be 115. |
| 49 |
|
| 50 |
#. By default, DIFT will scan a wide range of alpha values and automatically select the optimal |
| 51 |
value (the highest alpha yielding a good fit). Too large of an alpha will cause oversmoothing |
| 52 |
of the P(r) curve and a poor fit of the I(q) curve. Too small of an alpha will cause ripples |
| 53 |
in the P(r) curve. |
| 54 |
|
| 55 |
* *Try:* Vary alpha and monitor the effect on P(r) smoothness and fit of I(q) |
| 56 |
|
| 57 |
#. Click Scan Alpha to automatically determine alpha again. Note that you can select a different |
| 58 |
Dmax and select Scan Alpha, which will likely return a different alpha. In contrast, the |
| 59 |
Auto Dmax button is not affected by alpha. |
| 60 |
|
| 61 |
* *Note:* Alpha can be a very wide range of values (Scan Alpha scans through 40 orders of |
| 62 |
magnitude). To make selecting alpha easier, the log10(alpha) is used to set the alpha |
| 63 |
in the input instead of alpha itself. |
| 64 |
|
| 65 |
* *Tip:* If you find the automatic selection of alpha slow, uncheck the "Update alpha when |
| 66 |
changing params" checkbox to avoid recalculating alpha whenever you change a setting. |
| 67 |
You can always manually click Scan Alpha when desired. |
| 68 |
|
| 69 |
#. Click "OK" to exit the panel and save the IFT to the RAW IFTs panel and plot. |
| 70 |
|
| 71 |
* *Tip:* After exiting the IFT panel, note that data from the IFT shows |
| 72 |
up in the Information panel. |
| 73 |
|
| 74 |
#. Click on the IFTs Control and Plot tabs. This will display the DIFT output you just generated. |
| 75 |
Save the **glucose_isomerase.ift** item in the **reconstruction_data** folder. |
| 76 |
|
| 77 |
* *Note:* This saved file is the same format as the BIFT .ift file. |
| 78 |
|
| 79 |
#. You can save the IFT in the pdf report that RAW can make. Right click on |
| 80 |
the **glucose_isomerase.ift** item in the IFT control panel and |
| 81 |
select "Save report". In the window that opens click "Save Report" and |
| 82 |
save the pdf report. If you open the report you will see a plot of the P(r) |
| 83 |
function and a summary of the run parameters and numerical results saved |
| 84 |
as a table. |
| 85 |
|
| 86 |
* *Try:* Save both the GI profile and the IFT in the same report. |
| 87 |
|
| 88 |
|dift_report_png| |
| 89 |
|
| 90 |
.. |dift_panel_png| image:: images/dift_panel.png |
| 91 |
:target: ../_images/dift_panel.png |
| 92 |
|
| 93 |
.. |dift_report_png| image:: images/dift_report.png |
| 94 |
:width: 450 px |
| 95 |
:target: ../_images/dift_report.png |
| 96 |
|
| 97 |
.. |Rg| replace:: R\ :sub:`g` |
| 98 |
|
| 99 |
.. |Dmax| replace:: D\ :sub:`max` |