GithubHelp home page GithubHelp logo

pyphotonics's Introduction

pyphotonics

PyPhotonics is a post-processing python code that calculates photonic properties of materials. Based on the outcome of DFT, constrained DFT and vibrational calculations using DFT performed using VASP for a defect system, PyPhotonics uses the results in the output files and calculates the Huang-Rhys factor of the defect and the photoluminescence line-shape. Soon, the code will calculate the carrier capture coefficient and carrier lifetimes for defects, which are essential quantities for assessing the photovoltaic efficiency of materials.

If you wish to use PyPhotonics, please cite our paper:

Installation

You can install PyPhotonics using the pip command: pip install pyphotonics. The following python packages are required:

  • scipy
  • numpy
  • pandas
  • matplotlib
  • oganesson

Directory structure

The pyphotonics module is composed of the following files:

/pyphotonics
    /__init__.py
    /constants.py: A list of physical constants.
    /photoluminescence.py: Contains the Photoluminescence class, which drives the photonics calculations.

# How to use

To calculate the photonics properties of a crystal using pyphotonics, a number of DFT calculations should be performed with VASP first:
- The ground state structure of the crystal should be optimized. Let's call the output file CONTCAR_GS.
- The excited state structure of the crystal should be optimized. Let's call the output file CONTCAR_ES. For a tutorial on how to setup such calculation, see this [tutorial](./vasp_constrained_occupations.md)
- The phonon modes of the ground state system should be calculated with VASP, and the `bands.yaml` file should be produced using the `phonopy` code.

Once all of the above is done, you can calculate the HR factor and PL line-shape as follows (the complete example is in the `test/` directory):

from pyphotonics.photoluminescence import Photoluminescence modes = 189 #number of modes m = <> path_phonopy = './' #path to the bands.yaml file path = './' #path to the structure files p = Photoluminescence(path_phonopy, path + "CONTCAR_GS", path + "CONTCAR_ES", 189, "phonopy", m, 1000)


# How to setup INCAR for CDFT

Instructions and examples are [here](vasp_constrained_occupations.md).

pyphotonics's People

Contributors

sheriftawfikabbas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.