hkl_generator is a Python-based tool for generating and analyzing crystallographic reflection conditions (hkl indices) using space group symmetry rules. The tool leverages data from the Bilbao Crystallographic Server to determine allowed reflections based on the space group's systematic absences.
⚒️🚧 WORK IN PROGRESS. PACKAGE IS NOT COMPLETE 🚧⚒️
- Generate allowed hkl reflections for a given crystallographic space group
- Supports both CSV and JSON formats for reflection condition data
- Includes pre-loaded condition tables for commonly used space groups
The repository provides example reflection condition files for several space groups:
bilbao_refl_cond_table_I411.csvbilbao_refl_cond_table_Ia-3d.jsonbilbao_refl_cond_table_P21_c.csvbilbao_refl_cond_table_Pm-3m.jsonbilbao_refl_cond_table_expanded_Pa-3.csv
These files contain systematic absence rules for filtering valid hkl triplets.
Clone the repository and install required dependencies:
git clone https://github.com/MarcoVando/hkl_generator.git
cd hkl_generator
pip install -r requirements.txtYou can run the script directly:
python main.py
The script will prompt for input parameters or allow you to choose a reflection condition file and generate the list of valid hkl reflections accordingly.
Alternatively, you can import functions from the module and use it programmatically:
from hkl_generator import generate_hkl
hkl_list = generate_hkl(space_group="Pm-3m", max_index=10)
print(hkl_list)
This project is licensed under the BSD 3-Clause License. See the LICENSE file for more information.
Reflection condition data provided by the Bilbao Crystallographic Server.