Better documentation / naming for `eliminate_sys_absent`

オープン
#3,066 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
40/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp, python

調査の方向性

Start with eliminate_sys_absent in src/dials/algorithms/symmetry/init.py, around lines 431-449, and its callers near lines 706-709 in the same file, which is where the comment says it only removes centring-related absences. Follow the space group checks there (n_ltr() and build_derived_reflection_intensity_group) to confirm what the function does. Done means a clearer function name, a docstring that explains the centring logic, and a stated answer, or a documented limitation, for the non-Sohncke space groups raised in the issue.

索引モデルが issue の本文から書いたものです。

説明

dials.symmetry and dials.cosym both call this function during the preparation of data sets for symmetry analysis:

https://github.com/dials/dials/blob/2150456baf2274f1350a114a7b877ee8532a77e9/src/dials/algorithms/symmetry/__init__.py#L431-L449

This seems an odd thing to do - why would you eliminate the systematic absences prior to symmetry testing! However, the comment above where the function is called suggests this is only to remove systematic absences due to centring:

https://github.com/dials/dials/blob/2150456baf2274f1350a114a7b877ee8532a77e9/src/dials/algorithms/symmetry/__init__.py#L706-L709

How do we know this is true? Well, first of all the function only does anything if expt.crystal.get_space_group().n_ltr() > 1. Hmmm. That's not particularly helpful in and of itself, but digging into the source code one finds out it is the number of lattice translations

      //! Number of lattice translations.
      std::size_t
      n_ltr() const { return ltr_.size(); }

and this is only > 1 for a centred cell. The additional bit of magic is expt.crystal.get_space_group().build_derived_reflection_intensity_group(anomalous_flag=True). While I haven't figured out exactly what this is for yet, I do know that if you feed it a space group with a screw axis, like $I\ 2_1\ 3$ then it returns one without ($I\ 2\ 3$ in this case).

It would be really helpful if this function was better documented, and had a better name. Also, is this guaranteed to do this right thing for the 165 non-Sohncke space groups?

主要言語
Python
スター
107
フォーク
61
平均マージ
2日 15時間
マージ済み PR(30日)
12

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dials/dials のほかの issue

dials/dials の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。