File: s2_crysol.rst

package info (click to toggle)
bioxtasraw 2.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 275,072 kB
  • sloc: python: 74,496; makefile: 29; sh: 21
file content (284 lines) | stat: -rw-r--r-- 12,634 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
Theoretical profiles and fitting from models – CRYSOL in RAW
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. _crysol_tutorial:

One of the most useful things to do with SAXS data is to compare the data
against high resolution models (such as crystallography or CryoEM structures or
AlphaFold models). You can generate theoretical scattering profiles from
high resolution models, such as pdb models, independent of the experimental
data. You can also fit these generated theoretical scattering profiles against
the experimental SAXS data.

While it might seem that the most rigorous approach would be to generate a
theoretical profile independent of the experimental data, this 'minimal' approach
often fails to produce good fits even when the model and solution structure are
in good agreement. This is because there are contributions from the solvent,
particularly the hydration layer and the excluded volume, that are hard to model
and that most theoretical scattering profile calculators treat as fit parameters.
So to get the most accurate understanding of whether your model fits the data,
you should actually fit the data as part of the process of generating the
theoretical profile, rather than generating a 'minimal' theoretical profile
and comparing to the data.

One of the most common programs to generate theoretical scattering profiles
is the CRYSOL program in the ATSAS package. We will use RAW to run CRYSOL. Note
that you need :ref:`ATSAS installed <atsas>` to do this part of the tutorial.

If you use RAW to run CRYSOL, in addition to citing the RAW paper, please
cite the paper given in the `CRYSOL manual. <https://biosaxs-com.github.io/atsas/4.0.0/manuals/crysol.html>`_

The written version of the tutorial follows.

#.  The easiest way to generate a theoretical profile in RAW using CRYSOL
    is simply to plot a **.pdb** or **.cif** file. In the Files Control
    Panel go to the **theory_data** folder, select the **1XIB_4mer.pdb**
    and click the plot button.

#.  After the calculation is done, RAW will plot the theoretical profiles
    from CRYSOL on the profiles plot. You should see two profiles,
    **1XIB_4mer.abs** and **1XIB_4mer.int**

    *   *Note:* The difference between **.abs** and **.int** results from CRYSOL
        is simply the overall scale factor. The **.abs** is on an absolute
        scale of 1/(cm*(mg/ml)), while **.int** is on an arbitrary scale.
        Generally **.abs** is probably more useful, since many beamlines
        calibrate their experimental data to an absolute scale, so this result
        will be relatively close in overall scale to what you measure.

    |theory_crysol_load_model_png|

#.  You can also generate a theoretical profile using the CRYSOL window in RAW.
    This gives you more control over the parameters used to generate the profile,
    using the plot button simply uses the default parameters. Select the
    "Tools->ATSAS->CRYSOL" menu option to open the CRYSOL window.

    |theory_crysol_menu_png|

#.  In the CRYSOL window, in the models section use the Add button to add
    the **1XIB_4mer.pdb** file to the list of models to calculate a theoretical
    profile from.

    |theory_crysol_model_add_png|

#.  Click the "Start" button to calculate the theoretical scattering profile
    for the model.

    *   *Note:* The Status will change to "Running calculation" while running
        and then to "Finished calculation" when finished.


    |theory_crysol_start_png|

#.  After the calculation finishes, the theoretical profile will display in the
    plot on the right side of the window, and parameters from the profile will
    be shown in the list at the bottom right of the window.

    *   *Note:* Not all parameters will display. The Data, Chi^2, and Prob.
        fields are only calculated if the model is fit to data.

    |theory_crysol_results1_png|

#.  The CRYSOL window can also be used to fit the model against experimental
    data. Go back to the Files Control Panel and load in the **glucose_isomerase.dat**
    data. Return to the CRYSOL window. In the Experimental data section use the
    Add button, check the **glocuse_isomerase.dat** item in the dialog that
    appears, and then click OK to add the **glucose_isomerase.dat** experimental data to the
    list of data you can fit a model against.

    *   *Note:* Only data that is loaded into RAW can be added to the CRYSOL
        experimental data list.

    |theory_crysol_data_add_png|

#.  Click the Start button to calculate the theoretical scattering profile and
    fit it to the data. After the calculation finishes you'll see both the
    theoretical profile, the data, and the uncertainty normalized residual
    plotted in the right plot, as well as the parameters from the theoretical
    profile in the list at the bottom right.

    *   *Note:* This will now have all parameters, including the Data, Chi^2, and
        Prob. fields that were missing when you calculated a theoretical profile
        without fitting.

    |theory_crysol_results2_png|

#.  Click the OK button to close the CRYSOL window and send the calculated
    theoretical scattering profile to the Profiles plot. It will appear as
    **1XIB_4mer_glucose_isomerase_FIT** in the Profiles Control Panel.

#.  You can also load more than one model and/or profile into the CRYSOL window
    to calculate multiple profiles at once. Load the **polymerase.dat**
    experimental data into RAW. Select both the polymerase and GI profiles in the
    Profiles Control Panel, right click on the **polymerase.dat** profile and select
    "Other Analysis->Fit Model (CRYSOL)". This will open the CRYSOL window with
    the selected profiles already loaded in the Experimental Data section.

    |theory_crysol_right_click_png|

#.  Add the **1XIB_4mer.pdb** (GI) and **2pol.cif** (polymerase) models to the
    CRYSOL model section.

#.  Uncheck the **2pol.pdb** model in the Models list. Only items that are checked
    are used for calculation, so this will let you fit just the **1XIB_4mer.cif**
    model.

    |theory_crysol_model_select_png|

#.  Click the Start button to fit the **1XIB_4mer.cif** model against both experimental
    profiles. After the calculation finishes you'll see both experimental profiles and the
    theoretical profile fit to both measured profiles.

    *   *Question:* Which dataset does the model fit better?

    *   *Try:* Turn off the 1XIB_4mer model and turn on the 2pol model and see
        how that fits both profiles.

    |theory_crysol_results3_png|

#.  You can also fit multiple models against a single profile. Check both
    the **1XIB_4mer.pdb** and **2pol.cif** entries in the models list
    and uncheck the **glucose_isomerase.dat** experimental data.

    |theory_crysol_data_select_png|

#.  Click the Start button to fit both models against the polymerase data.

    *   *Question:* Which model fits the profile better?

    *   *Try:*  Turn off the polymerase profile and turn on the GI profile
        and see how each model fits that data.

    *   *Tip:* You can also calculate the theoretical scattering profile from
        multiple models without fitting against data. To do this, uncheck all the
        data items and calculate the 'minimal' theoretical profiles.

    |theory_crysol_results4_png|

#.  You can fit multiple models against multiple profiles. Check both models
    and both experimental profiles. Click the start button to fit both models
    against both experimental profiles.


#.  You can export the values in the results table to a csv file. Right click
    on the table and select Export Data. Save the .csv file in the **theory_data**
    folder.

    *   *Try:* Open the .csv file in Excel or another spreadsheet program.

    |theory_crysol_export_data_png|

#.  Click OK to close the CRYSOL window and send all the fits to the Profiles
    plot and control panel.

#.  You can also adjust the settings for running CRYSOL from the CRYSOL
    window. We'll do that using some example data. Load the **SASDP43.dat**
    experimental data into RAW.

    *   *Note:* This dataset is from the `SASDP43 entry in the SASBDB
        <https://www.sasbdb.org/data/SASDP43/>`_

#.  Open a CRYSOL window and add the **Brpt55_M_Zn.pdb** model and the
    **SASDP43.dat** data.

#.  Run the CRYSOL fitting with the default settings.

#.  Open a second CRYSOL window and add the same model and data to it.
    Set the harmonics to 100. Run the CRYSOL fitting with these updated settings.

    |theory_crysol_harmonics_png|

#.  You should see that the result using 100 harmonics is a better fit than the
    result using the default harmonics.

    *   *Note:* More harmonics are necessary to get accurate theoretical profiles
        from high aspect ratio objects. This protein happens to be a long thin
        rod, so using more harmonics is helpful here. For something globular, like
        GI, it should make little or no difference. You can test this yourself
        using the tutorial data.

    |theory_crysol_results5_png|

#.  There are also a number of advanced settings you can set. Expand the
    Advanced Setting section and (if necessary) scroll down to see the
    different options. The settings are explained in detail in the CRYSOL
    manual.

    *   *Note:* Common settings to change are the solvent density and contrast
        (requires turning off the "Fit solvent" option).

    *   *Tip:* If you need all the CRYSOL outputs (such as the .log and .alm files)
        you can check the "Save all outputs to folder" option and provide
        a folder to save to by clicking the "..." button after the "Save to" field.

    |theory_crysol_settings_png|

#.  Close the CRYSOL windows with the OK button to save the fit results to
    the Profiles plot and control panel.

#.  You can save information from a theoretical profile generated by CRYSOL in RAW
    as part of a pdf report. Right click on the **1XIB_4mer_glucose_isomerase_FIT**
    item in the Profiles control panel and select "Save report". In the window
    that opens click "Save Report" and save the pdf report. If you open the
    report you will see the usually summary pots and a table with a summary of
    theoretical profile parameters.

    |theory_crysol_report_png|

.. |theory_crysol_load_model_png| image:: images/theory_crysol_load_model.png
    :target: ../_images/theory_crysol_load_model.png

.. |theory_crysol_menu_png| image:: images/theory_crysol_menu.png
    :target: ../_images/theory_crysol_menu.png
    :width: 400 px

.. |theory_crysol_model_add_png| image:: images/theory_crysol_model_add.png
    :target: ../_images/theory_crysol_model_add.png

.. |theory_crysol_start_png| image:: images/theory_crysol_start.png
    :target: ../_images/theory_crysol_start.png
    :width: 300 px

.. |theory_crysol_results1_png| image:: images/theory_crysol_results1.png
    :target: ../_images/theory_crysol_results1.png

.. |theory_crysol_data_add_png| image:: images/theory_crysol_data_add.png
    :target: ../_images/theory_crysol_data_add.png

.. |theory_crysol_results2_png| image:: images/theory_crysol_results2.png
    :target: ../_images/theory_crysol_results2.png

.. |theory_crysol_right_click_png| image:: images/theory_crysol_right_click.png
    :target: ../_images/theory_crysol_right_click.png
    :width: 400 px

.. |theory_crysol_model_select_png| image:: images/theory_crysol_model_select.png
    :target: ../_images/theory_crysol_model_select.png
    :width: 300 px

.. |theory_crysol_results3_png| image:: images/theory_crysol_results3.png
    :target: ../_images/theory_crysol_results3.png

.. |theory_crysol_data_select_png| image:: images/theory_crysol_data_select.png
    :target: ../_images/theory_crysol_data_select.png
    :width: 300 px

.. |theory_crysol_results4_png| image:: images/theory_crysol_results4.png
    :target: ../_images/theory_crysol_results4.png

.. |theory_crysol_export_data_png| image:: images/theory_crysol_export_data.png
    :target: ../_images/theory_crysol_export_data.png

.. |theory_crysol_harmonics_png| image:: images/theory_crysol_harmonics.png
    :target: ../_images/theory_crysol_harmonics.png
    :width: 300 px

.. |theory_crysol_results5_png| image:: images/theory_crysol_results5.png
    :target: ../_images/theory_crysol_results5.png

.. |theory_crysol_settings_png| image:: images/theory_crysol_settings.png
    :target: ../_images/theory_crysol_settings.png
    :width: 300 px

.. |theory_crysol_report_png| image:: images/theory_crysol_report.png
    :target: ../_images/theory_crysol_report.png
    :width: 450 px