LoginSignup
0
0

Dialsをターミナルで利用した際の備忘録

Last updated at Posted at 2023-12-02

DialsはX線結晶構造解析における回折像処理ソフト。XDSやHKLが有名だが最近DIALSを使う例も増えてきているらしい。

インストール

以下のページからダウンロードしてインストールする。
私がmac ユーザーなので、macを利用した場合についてのみここで簡単に説明する。

Mac graphical binary installersからインストールするのが簡便である。
ここから対象アプリをダウンロードし、インストールを実行する。
実行後、ターミナルを起動し、以下のコマンドを入力すると利用可能になる。

source /Applications/dials-dev20150903/dials_env.sh

実際の解析

解析は以下のtutorialページに従って実施するのが良い。

データのインポート

目的のデータファイルがあるフォルダに移動する。
KEKなどで測定した場合、collect_01_00001_master.h5といったファイルのがあるフォルダである。
該当フォルダの中にサブフォルダを作成し解析していく。

mkdir dials
cd dials

次に以下のコマンドでデータをインポートする。

dials.import ../collect_01_00001_master.h5

正常に実行されれば以下のような文字列が出力され、dials.import.logとimported.exptの2つのファイルが出力される。

DIALS (2018) Acta Cryst. D74, 85-97. https://doi.org/10.1107/S2059798317017235
DIALS 3.dev.1068-g8f16d0a9a
The following parameters have been modified:

input {
  experiments = <image files>
}

--------------------------------------------------------------------------------
  format: <class 'dxtbx.format.FormatHDF5EigerNearlyNexus.FormatHDF5EigerNearlyNexus'>
  template: /folder_path/collect_01_00001_master.h5:1:720
  num images: 720
  sequences:
    still:    0
    sweep:    1
  num stills: 0
--------------------------------------------------------------------------------
Writing experiments to imported.expt

以下のコマンドで画像を確認することができる。

dials.image_viewer imported.expt

Image viewerが起動され、解説画像を確認することができる。

スポットの検出

以下のコマンドでスポットを検出する。

dials.find_spots imported.expt nproc=4

正常に終了するとstrong.reflとdials.find_spots.logが出力される。
以下のコマンドで検出されたスポットの位置を確認することができる。

dials.image_viewer imported.expt strong.refl

Indexの実施

次に以下のコマンドIndexingを実施する。

この時点で例のように空間群を指定することもできるようである。

dials.index imported.expt strong.refl

#空間群を指定する際の例。
dials.index imported.expt strong.refl unit_cell=37,79,79,90,90,90 space_group=P43212

正常に終了するとdials.index.log、indexed.exptとindexed.reflが出力される。

## Bravais Lattice Refinement

次に以下の処理で空間群を予測する。

dials.refine_bravais_settings indexed.expt indexed.refl

そうすると以下のような結果が出力される。

Chiral space groups corresponding to each Bravais lattice:
aP: P1
mP: P2 P21
mC: C2
oP: P222 P2221 P21212 P212121
oC: C2221 C222
tP: P4 P41 P42 P43 P422 P4212 P4122 P41212 P4222 P42212 P4322 P43212
+------------+--------------+--------+--------------+----------+-----------+------------------------------------------+----------+------------+
|   Solution |   Metric fit |   rmsd | min/max cc   |   #spots | lattice   | unit_cell                                |   volume | cb_op      |
|------------+--------------+--------+--------------+----------+-----------+------------------------------------------+----------+------------|
|          9 |       1.019  |  0.213 | 0.758/0.842  |    15642 | tP        | 58.42  58.42 133.70  90.00  90.00  90.00 |   456237 | a,b,c      |
|          8 |       1.019  |  0.213 | 0.800/0.842  |    15651 | oP        | 58.38  58.40 133.64  90.00  90.00  90.00 |   455571 | a,b,c      |
|          7 |       1.019  |  0.211 | 0.812/0.812  |    15646 | mP        | 58.30  58.29 133.41  90.00  90.09  90.00 |   453301 | -b,-a,-c   |
|          6 |       0.9781 |  0.212 | 0.800/0.800  |    15632 | mP        | 58.40  58.42 133.70  90.00  90.09  90.00 |   456100 | a,b,c      |
|   *      5 |       0.2858 |  0.079 | 0.792/0.842  |    15153 | oC        | 80.68  82.04 131.62  90.00  90.00  90.00 |   871181 | a+b,-a+b,c |
|   *      4 |       0.2858 |  0.079 | 0.842/0.842  |    15152 | mP        | 57.53 131.62  57.53  90.00  90.95  90.00 |   435611 | b,c,a      |
|   *      3 |       0.2032 |  0.076 | 0.794/0.794  |    15262 | mC        | 82.23  80.85 131.93  90.00  90.15  90.00 |   877112 | a-b,a+b,c  |
|   *      2 |       0.201  |  0.074 | 0.792/0.792  |    15110 | mC        | 80.55  81.90 131.39  90.00  90.15  90.00 |   866706 | a+b,-a+b,c |
|   *      1 |       0      |  0.068 | -/-          |    15163 | aP        | 57.58  57.58 131.74  90.00  90.29  90.98 |   436723 | a,b,c      |
+------------+--------------+--------+--------------+----------+-----------+------------------------------------------+----------+------------+
* = recommended solution

Saving summary as bravais_summary.json
Saving solution 9 as bravais_setting_9.expt
Saving solution 8 as bravais_setting_8.expt
Sav。、ing solution 7 as bravais_setting_7.expt
Saving solution 6 as bravais_setting_6.expt
Saving solution 5 as bravais_setting_5.expt
Saving solution 4 as bravais_setting_4.expt
Saving solution 3 as bravais_setting_3.expt
Saving solution 2 as bravais_setting_2.expt
Saving solution 1 as bravais_setting_1.expt

この出力をもとに空間群を選択する。
次に、以下のコマンドでindexed.refineの情報を目的の空間群に変更する。
今回はsolution 5がらしいと考えたので、change_of_basis_op=a+b,-a+b,cとする。
必要に応じて=の後を表から選ぶ。

dials.reindex indexed.refl change_of_basis_op=a+b,-a+b,c

dials.reindex.logとreindexed.reflが出力される。

Refinement

次にrefinementの実施する。

dials.refine -c -e 1

先ほどの解析で利用すると決めたsettingを選ぶ。今回は5番を利用することにしたので、以下のように入力する。

dials.refine bravais_setting_5.expt reindexed.refl

refined.expt、refined.reflとdials.refine.logが出力されるので、これらを次の解析に利用する。

Integration

以下の操作でintegrationを実施する。

dials.integrate refined.expt refined.refl nproc=4

以下の3つのファイルが出力される。
integrated.refl
dials.integrate.log
integrated.expt

Symmetry analysis

dials.symmetry integrated.expt integrated.refl

ここはスキップすることもできます。スキップする場合は以下のscalingでの値をintegrated.exptとintegrated.reflに設定します。ここで空間群を指定できないので、自身で指定したい場合はskipすると良いかと思います。

Scaling

まず、以下のコマンドでスケーリングを実施する。

dials.scale symmetrized.expt symmetrized.refl

#symmetry analysisをskipする場合
dials.scale integrated.expt integrated.refl

Merging statistics by resolution binを確認し、分解能を考える。
出力を確認し、分解能を指定して再度scalingを実施する。

dials.scale symmetrized.expt symmetrized.refl d_min=1.4

#symmetry analysisをskipする場合
dials.scale integrated.expt integrated.refl d_min=1.4

最後にマージを実施する。

dials.merge scaled.expt scaled.refl

merged.mtzが出力されるので、このデータが解析に使える。

HTMLファイルが出力されるので、解析状態を確認できる。

HTML report

以下のコマンドでHTMLのレポートを作成できる。

dials.report scaled.expt scaled.refl
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0