An online, web-based tool for calculating powder X-ray and neutron diffraction (XRD and ND) patterns, as well as partial and total radial distribution functions (PRDF, RDF) from crystal structures (CIF, VASP, LMP, XYZ (with cell information)). It features an integrated search interface for directly accessing and importing structures from the Materials Project (MP), Automatic FLOW (AFLOW), and Crystallography Open Database (COD) databases. Users can also interactively visualize uploaded structures and perform basic modifications (change elements, occupancies, lattice parameters), convert between conventional and primitive cells and introduce point defects, and download the corresponding files in different formats (CIF, VASP, LMP, XYZ).
🔗 Try the application online here: XRDlicious
🔗 For creation of supercells and point defects, please use the submodule here: Point defects
🔗 For (P)RDF calculations from LAMMPS or XYZ trajectories, please compile separated module locally here: (P)RDF from LAMMPS/XYZ
🔗 For tutorials how to use the XRDlicious, please visit this site:implant.fs.cvut.cz/xrdlicious
For more computationally demanding calculations with more extensive data, please compile the code locally on your computer (follow the manual below). For planned features and modifications in the app, please see the Roadmap on the application website.
- Python 3.x (Tested 3.12)
- Console (For Windows, I recommend to use WSL2 (Windows Subsystem for Linux))
- Git (optional for downloading the code)
Open your terminal console and write the following commands (the bold text):
(Optional) Install Git:
sudo apt update
sudo apt install git
-
Download the XRDlicious code from GitHub (or download it manually without Git on the following link by clicking on 'Code' and 'Download ZIP', then extract the ZIP. With Git, it is automatically extracted):
git clone https://github.com/bracerino/xrdlicious.git -
Navigate to the downloaded project folder:
cd xrdlicious/ -
Create a Python virtual environment to prevent possible conflicts between packages:
python3 -m venv xrdlicious_env -
Activate the Python virtual environment (before activating, make sure you are inside the xrdlicious folder):
source xrdlicious_env/bin/activate -
Install all the necessary Python packages:
pip install -r requirements.txt -
Run the XRDlicious app (always before running it, make sure to activate its Python virtual environment (Step 4):
streamlit run app.py
Python 3.12.3
- numpy==1.26.4
- matplotlib==3.10.3
- ase==3.25.0
- matminer==0.9.3
- pymatgen==2025.5.28
- plotly==6.1.2
- streamlit-plotly-events==0.0.6
- setuptools==80.9.0
- mp-api==0.45.3
- aflow==0.0.11
- pillow==11.2.1
- pymatgen-analysis-defects==2025.1.18
- psutil==7.0.0
- Search interface for MP, AFLOW, and COD databases. Structures can be directly added to the application, or their CIF can be downloaded and they can be accessed on the original link.
- Visualize data, modify atomic elements, occupancies, and lattice parameters, download structures in CIF, VASP, LMP, XYZ (with lattice) formats
- Calculate theoretical powder XRD, ND patterns from uploaded structures or structures retrieved from MP, AFLOW, and COD databases. Upload experimental diffraction data (.xy format) and subtract their backgroud for comparison with theoretical patterns.
- Calculate (P)RDF from the trajectory file (.lammps or .xyz) at given frame sampling. Allows to plot average (P)RDF across the selected frames, or (P)RDF at individual frames with the animation showing its (P)RDF evolution over time. Requires separated local compilation due to the high computational demand.