dials / dials

Diffraction Integration for Advanced Light Sources
https://dials.github.io
BSD 3-Clause "New" or "Revised" License
70 stars 47 forks source link

`dials.reindex` removes unit cell parameter esds even when Bravais lattice unchanged #1934

Open huwjenkins opened 2 years ago

huwjenkins commented 2 years ago

e.g. change space group from P222 to P212121:

dials.show scaled.expt |egrep "Unit|Space"

    Unit cell: 5.417(18), 10.72(4), 21.66(7), 90.0, 90.0, 90.0
    Space group: P 2 2 2

dials.reindex scaled.{expt,refl} space_group=P212121

dials.show reindexed.expt |egrep "Unit|Space"

    Unit cell: 5.417, 10.719, 21.662, 90.000, 90.000, 90.000
    Space group: P 21 21 21
dagewa commented 2 years ago

This first happens here, even if the cb_op is identity: https://github.com/dials/dials/blob/d3f9572885d2c319f39e4b3f6aa6a37c2072a767/command_line/reindex.py#L131

I think it would still happen later even if we avoided this call, because we later do: https://github.com/dials/dials/blob/d3f9572885d2c319f39e4b3f6aa6a37c2072a767/command_line/reindex.py#L145 and set_B does this: https://github.com/cctbx/dxtbx/blob/20d4cf201afe4465e0d01bbfb50dfb688b33b463/src/dxtbx/model/crystal.h#L456-L457

I suppose the solution is that in such a case we should not be setting B either

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. The label will be removed automatically if any activity occurs. Thank you for your contributions.