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 mailto:[email protected]> wrote:
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 mailto:[email protected]> 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, 李选选 mailto:[email protected]> 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]mailto:[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 9246tel:(510)%20289-9246
PHENIX: http://www.phenix-online.orghttp://www.phenix-online.org/
CAMERA: http://camera.lbl.gov/
-----------------------------------------------------------------
_______________________________________________
cctbxbb mailing list
[email protected]mailto:[email protected]
http://phenix-online.org/mailman/listinfo/cctbxbb
_______________________________________________
cctbxbb mailing list
[email protected]mailto:[email protected]
http://phenix-online.org/mailman/listinfo/cctbxbb
--
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom