Dear cctbx developers,
I’m Xuanxuan, and I’m using cctbx to develop a crystallography-related algorithm. Recently, I found there is something wrong when I use miller package to generate miller indices for given space group and unit cell parameters. Maybe it’s my mistake, or it’s a bug.
Here are some details. I just use the following code to generate a list of miller indices for a Fd-3m crystal.
ms = miller.build_set( crystal_symmetry=crystal.symmetry( space_group_symbol='Fd-3m', unit_cell=(5.4307,5.4307,5.4307,90.00,90.0,90.00)), anomalous_flag=False, d_min=0.4)
And I found some reflections are missing, like 220, 311, which should exist according to the reflection conditions listed in this page http://img.chem.ucl.ac.uk/sgp/large/227az2.htm http://img.chem.ucl.ac.uk/sgp/large/227az2.htm.
Looking forward to your response.
Thanks, Xuanxuan
Hi Xuanxuan,
This:
from cctbx import miller
import cctbx
from cctbx import crystal
ms = miller.build_set(
crystal_symmetry=crystal.symmetry(
space_group_symbol='Fd-3m',
unit_cell=(5.4307,5.4307,5.4307,90.00,90.0,90.00)),
anomalous_flag=False,
d_min=0.4)
for hkl in ms.indices():
print hkl
gives:
(0, 2, 2)
.
.
.
(1, 3, 3)
etc
2,2,0 is related by symmetry to 0,2,2
HTH-P
On 5 December 2017 at 01:01, 李选选
Dear cctbx developers,
I’m Xuanxuan, and I’m using cctbx to develop a crystallography-related algorithm. Recently, I found there is something wrong when I use miller package to generate miller indices for given space group and unit cell parameters. Maybe it’s my mistake, or it’s a bug.
Here are some details. I just use the following code to generate a list of miller indices for a Fd-3m crystal.
ms = miller.build_set( crystal_symmetry=crystal.symmetry( space_group_symbol='Fd-3m', unit_cell=(5.4307,5.4307,5.4307,90.00,90.0,90.00)), anomalous_flag=False, d_min=0.4)
And I found some reflections are missing, like 220, 311, which should exist according to the reflection conditions listed in this page http://img.chem.ucl.ac.uk/sgp/large/227az2.htm.
Looking forward to your response.
Thanks, Xuanxuan
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
-- ----------------------------------------------------------------- P.H. Zwart Staff Scientist Molecular Biophysics and Integrated Bioimaging & Center for Advanced Mathematics for Energy Research Applications Lawrence Berkeley National Laboratories 1 Cyclotron Road, Berkeley, CA-94703, USA Cell: 510 289 9246 PHENIX: http://www.phenix-online.org CAMERA: http://camera.lbl.gov/ -----------------------------------------------------------------
Hi Peter,
Will the command ms.expand_to_P1() do the trick to generate all symmetry
peaks?
Best,
Haiguang
On Wed, Dec 6, 2017 at 2:13 AM, Peter Zwart
Hi Xuanxuan,
This:
from cctbx import miller import cctbx from cctbx import crystal
ms = miller.build_set( crystal_symmetry=crystal.symmetry( space_group_symbol='Fd-3m', unit_cell=(5.4307,5.4307,5.4307,90.00,90.0,90.00)), anomalous_flag=False, d_min=0.4)
for hkl in ms.indices(): print hkl
gives:
(0, 2, 2) . . . (1, 3, 3)
etc
2,2,0 is related by symmetry to 0,2,2
HTH-P
On 5 December 2017 at 01:01, 李选选
wrote: Dear cctbx developers,
I’m Xuanxuan, and I’m using cctbx to develop a crystallography-related algorithm. Recently, I found there is something wrong when I use miller package to generate miller indices for given space group and unit cell parameters. Maybe it’s my mistake, or it’s a bug.
Here are some details. I just use the following code to generate a list of miller indices for a Fd-3m crystal.
ms = miller.build_set( crystal_symmetry=crystal.symmetry( space_group_symbol='Fd-3m', unit_cell=(5.4307,5.4307,5.4307,90.00,90.0,90.00)), anomalous_flag=False, d_min=0.4)
And I found some reflections are missing, like 220, 311, which should exist according to the reflection conditions listed in this page http://img.chem.ucl.ac.uk/sgp/large/227az2.htm.
Looking forward to your response.
Thanks, Xuanxuan
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
-- ----------------------------------------------------------------- P.H. Zwart Staff Scientist Molecular Biophysics and Integrated Bioimaging & Center for Advanced Mathematics for Energy Research Applications Lawrence Berkeley National Laboratories 1 Cyclotron Road, Berkeley, CA-94703, USA Cell: 510 289 9246 <(510)%20289-9246>
PHENIX: http://www.phenix-online.org CAMERA: http://camera.lbl.gov/ -----------------------------------------------------------------
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
Yes, but then you loose the symmetry info. It is typically better to ensure
your reflections are all in the asymmetric the program uses.
use a
.map_to_asu()
on any set of miller indices you read in to make sure you are in the right
part of the ASU.
A map to ASU will generate the right indices you need, but the associated
epsilons, phase restrictions and reflection types (centric, acentric) will
be meaningless.
If you don't need those, it could be ok
P
On Tue, Dec 5, 2017 at 4:48 PM, Haiguang Liu
Hi Peter,
Will the command ms.expand_to_P1() do the trick to generate all symmetry peaks?
Best, Haiguang
On Wed, Dec 6, 2017 at 2:13 AM, Peter Zwart
wrote: Hi Xuanxuan,
This:
from cctbx import miller import cctbx from cctbx import crystal
ms = miller.build_set( crystal_symmetry=crystal.symmetry( space_group_symbol='Fd-3m', unit_cell=(5.4307,5.4307,5.4307,90.00,90.0,90.00)), anomalous_flag=False, d_min=0.4)
for hkl in ms.indices(): print hkl
gives:
(0, 2, 2) . . . (1, 3, 3)
etc
2,2,0 is related by symmetry to 0,2,2
HTH-P
On 5 December 2017 at 01:01, 李选选
wrote: Dear cctbx developers,
I’m Xuanxuan, and I’m using cctbx to develop a crystallography-related algorithm. Recently, I found there is something wrong when I use miller package to generate miller indices for given space group and unit cell parameters. Maybe it’s my mistake, or it’s a bug.
Here are some details. I just use the following code to generate a list of miller indices for a Fd-3m crystal.
ms = miller.build_set( crystal_symmetry=crystal.symmetry( space_group_symbol='Fd-3m', unit_cell=(5.4307,5.4307,5.4307,90.00,90.0,90.00)), anomalous_flag=False, d_min=0.4)
And I found some reflections are missing, like 220, 311, which should exist according to the reflection conditions listed in this page http://img.chem.ucl.ac.uk/sgp/large/227az2.htm.
Looking forward to your response.
Thanks, Xuanxuan
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
-- ----------------------------------------------------------------- P.H. Zwart Staff Scientist Molecular Biophysics and Integrated Bioimaging & Center for Advanced Mathematics for Energy Research Applications Lawrence Berkeley National Laboratories 1 Cyclotron Road, Berkeley, CA-94703, USA Cell: 510 289 9246 <(510)%20289-9246>
PHENIX: http://www.phenix-online.org CAMERA: http://camera.lbl.gov/ -----------------------------------------------------------------
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
-- ----------------------------------------------------------------- P.H. Zwart Staff Scientist Molecular Biophysics and Integrated Bioimaging & Center for Advanced Mathematics for Energy Research Applications Lawrence Berkeley National Laboratories 1 Cyclotron Road, Berkeley, CA-94703, USA Cell: 510 289 9246 PHENIX: http://www.phenix-online.org CAMERA: http://camera.lbl.gov/ -----------------------------------------------------------------
If you want to compute all possible Miller indices to a given resolution, for a unit cell, without considering symmetry something like this is what you need:
def generate_reflection_indices(uc, dmin):
maxh, maxk, maxl = uc.max_miller_indices(dmin)
indices = []
for h in range(-maxh, maxh + 1):
for k in range(-maxk, maxk + 1):
for l in range(-maxl, maxl + 1):
if h == 0 and k == 0 and l == 0:
continue
if uc.d((h, k, l)) < dmin:
continue
indices.append((h, k, l))
return indices
This does however mean that systematically absent reflections will be included - you would need to also test this with the space group object
Cheers Graeme
On 6 Dec 2017, at 00:48, Haiguang Liu
participants (5)
-
Graeme.Winter@diamond.ac.uk
-
Haiguang Liu
-
Peter Zwart
-
Petrus Zwart
-
李选选