[cctbxbb] Strange behaviour of resolution filter

Jan Marten Simons marten at xtal.rwth-aachen.de
Fri Feb 8 04:16:18 PST 2013


Hi,

I discovered a rather strange behaviour of the miller.index_generator.

Sample code showing the weirdness:

-----8<---------------------------

from __future__ import division
from cctbx import xray
from cctbx import crystal
from cctbx.array_family import flex


structure = xray.structure(
  special_position_settings=crystal.special_position_settings(
    crystal_symmetry=crystal.symmetry(
      unit_cell=(3.14098, 4.08327, 5.33966, 83, 109, 129),
      space_group_symbol="P 1")),
  scatterers=flex.xray_scatterer([
    xray.scatterer(
      label="Si",
      site=(0.,0.,0.),
      u=0.0)]))

fc1 = structure.structure_factors(d_min=1.0).f_calc().sort()
d_max, d_min = fc1.resolution_range()
fc2 = structure.structure_factors(d_min=d_min).f_calc().sort()

print(fc1.size(), fc2.size())
#fc1.show_array()
fc1.show_comprehensive_summary()
print("\nd_min: {}\n".format(d_min))
fc2.show_comprehensive_summary()
#fc2.show_array()

-----8<---------------------------

fc1 has 105 indices, while fc2 only has 104. Also fc2 has a higher d_min than 
fc1 although I'd expect both to have the same. To me it seems like the index 
with d==d_min is not included and only indices with d>d_min are calculated.
I wonder if this behaviour is the desired one or rather a bug, as I was quite 
surprised when I discovered this.

With regards,

 Dipl. Phys.
  Jan M. Simons
 
Institute of Crystallography
RWTH Aachen University


More information about the cctbxbb mailing list