PyPhotonics: How to plot photoluminescence lineshape based on a VASP calculation | ARC Centre of Excellence in Exciton Science

Some defects emit light.

For example, the well known nitrogen vacancy in diamond, and various types of vacancies in semiconductors such as silicon carbide, hexagonal boron nitride, zinc oxide and many others.

If you are studying defects in a semiconductor using VASP, PyPhotonics can help you find out their luminescence properties by a simple workflow that is documented in our paper ( and the code Github page (

PyPhotonics is, obviously, a python code that you can easily install on your computer.

In this tutorial, Dr Sherif Abbas is going to demonstrate how you can use PyPhotonics to model the nitrogen vacancy defect in diamond.

Using an optimised structural model for the defect, you will learn how to perform constrained DFT using VASP to obtain the ZPL energy.

Next, you will learn how to quickly perform a phonon calculation using VASP with the help of the phonopy code.

Finally, using the generated files, you will learn how to use PyPhotonics to calculate the Huang-Rhys factor, the spectral function and the photoluminescence lineshape of the defect.