gemmi icon indicating copy to clipboard operation
gemmi copied to clipboard

GroupOps.epsilon_factor_without_centering([0, 0, 0]) is twice Sgtbx result for centric space groups

Open kmdalton opened this issue 4 years ago • 0 comments

I am unsure if this is a bug in Gemmi or a bug in Sgtbx. Either way it is probably academic.

The following script can be used to confirm that Gemmi sometimes calculates an epsilon factor without centering which is twice the value given by Sgtbx. Oddly, this only applies to reflection 0,0,0 and affects all centric space groups.

#!/usr/bin/env cctbx.python
from cctbx import sgtbx
import gemmi

h = [0, 0, 0]


for s in list(sgtbx.space_group_symbol_iterator()):
    xhm  = s.universal_hermann_mauguin()
    sg   = sgtbx.space_group(s)
    sgtbx_epsilon = sg.epsilon(h)
    gemmi_go = gemmi.SpaceGroup(xhm).operations()
    gemmi_epsilon = gemmi_go.epsilon_factor_without_centering(h)
    if gemmi_epsilon != sgtbx_epsilon:
        centric = gemmi_go.is_centric()
        print(f"{xhm:>12}\t{centric}\t{gemmi_epsilon}\t{sgtbx_epsilon}")

kmdalton avatar Aug 05 '20 20:08 kmdalton