Skip to main content

TAS prediction tool

Project description

Documentation Status made-with-python License: MIT tests pypi black

PyTASER

PyTASER Docs

Official Documentation

PyTASER is a Python library for simulating differential absorption spectra in compounds using quantum chemical calculations, including transient (TAS) and differential (DAS) absorption spectroscopies. The goal of this library is to simulate spectra for comparison with and interpretation of experiments. The main features include:

  • Transient (TAS) and differential (DAS) absorption spectra for insulating and semiconducting crystals (using pre-calculated DFT, or database calculations)
  • Spectra for different temperature and carrier density conditions
  • Separation of spectral contributions from individual band-to-band transitions
  • Integration with the Materials Project database, allowing support for non-locally calculated materials
  • Ability to produce publication-ready figures, with flexibility in plotting.

PyTASER is designed for users with moderate experience in computational methods and optical techniques, enabled by the following features:

  • Use of Python as the programming language (due to its low entry barrier, flexibility and popularity in the materials modelling field)
  • Documentation and easy-to-follow workflows with complete unit-test coverage.
  • Interfaced with the popular materials analysis package pymatgen.
  • Currently compatible with VASP, while support for other electronic structure codes is planned – if you have a specific request, please open an issue!

Background

TAS is a powerful pump-probe tool to characterise the excited states of materials, while DAS can be used to represent how changes in a system affects its ground-state optical absorption spectra. These techniques can be used to understand microscopic processes in photochemical and electrochemical transformations, including phenomena such as electron trapping and carrier recombination.

The drawback is that TAS spectra are difficult to interpret, especially for crystals where the specific valence and conduction band structure can give rise to complex features. Our goal here is to predict TAS features from first-principles starting from the most simple models of static excitations through to the kinetics of relaxation of the excited state back to the ground state.

To achieve this, PyTASER identifies the allowed vertical optical transitions between electronic bands of the material to determine possible excitations that can occur from the ground 'dark' and excited 'light' electronic states. This is done by calculating the effective absorption in each state - this is a product of the joint density of states (JDOS) and the transition probability for each band transition, both of which are based on post-processing ground state DFT calculations. Once calculated, PyTASER compares changes in electronic transitions between the dark and light states, as demonstrated in the figure below.

Schematic TAS

Schematics of the ground and excited state electronic structures and optical profiles. The ground 'dark' state is at the top, showing full occupancy and unoccupancy (blue, orange) for the conduction and valence bands respectively. The excited 'light' state shows partial occupancy in a similar plot at the bottom. The overall DA plot is displayed to the right, the difference between the dark and light effective absorption plots.

JDOS method

Installation

To install the module with pip (recommended):

pip install pytaser

To install directly from the git repository:

pip install git+https://github.com/WMD-group/PyTASER

Alternatively python setup.py install can also be used.

PyTASER is compatible with Python 3.9+ and relies on a number of open-source packages, specifically:

Developer’s installation (optional)

For development work, PyTASER can also be installed from a copy of the source directory:

Download PyTASER source code using the command:

git clone https://github.com/WMD-group/PyTASER

Navigate to root directory:

cd PyTASER

Install the code with the command:

pip install -e .

This command tries to obtain the required packages and their dependencies and install them automatically.

Visualisation

The recommended approach is to use PyTASER within an interactive python environment (such as a Jupyter Notebook), as shown in the tutorials on the docs and the examples folder. Alternatively, you can use PyTASER through python scripts (e.g. with python <filename.py>).

If using your own, locally calculated data, please follow this workflow. Otherwise, use the MP-integrated workflow here.

Contributing

We appreciate any contributions in the form of a pull request. Please see the Contributing documentation for more details. Additional analysis/example spectra performed with PyTASER would be welcomed.

Please feel free to reach out to us via the Issue Tracker if there are any questions or suggestions.

Testing

Unit tests are in the tests directory and can be run from the top directory using pytest. Automatic testing is run on the master and develop branches using Github Actions.

Please run tests and add new tests for any new features whenever submitting pull requests.

Future Work

Future topics we plan to build on:

  • Incorporating finite-temperature effects (particularly for indirect band-to-band transitions)
  • Direct treatment of pump-probe time delay and relaxation kinetics
  • Incorporating spin-flip processes for spin-polarised systems
  • Description of defective crystals

Acknowledgements

The project has been developed by @savya10, @kavanase, @LucasGVerga and @youngwonwoo, under the supervision of @utf and @aronwalsh.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytaser-2.3.0.tar.gz (89.5 MB view details)

Uploaded Source

Built Distribution

pytaser-2.3.0-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

Details for the file pytaser-2.3.0.tar.gz.

File metadata

  • Download URL: pytaser-2.3.0.tar.gz
  • Upload date:
  • Size: 89.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for pytaser-2.3.0.tar.gz
Algorithm Hash digest
SHA256 c9db3fcb5b35167768a6ecf81b5b36c2536db54522edda69de674692828952fb
MD5 f0954688bca3233a1f9a11d0d5c18935
BLAKE2b-256 11598c180cb0f3a1a9023c02d76e96788ba29d276103a1a4d6e4991be6f52dfe

See more details on using hashes here.

File details

Details for the file pytaser-2.3.0-py3-none-any.whl.

File metadata

  • Download URL: pytaser-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 31.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for pytaser-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b4602bdac59acf1e9ea43e64d418945197cf8cc95060bc5854871ac2a4cbf049
MD5 2d78cc3a6f94c861511592358bccd81e
BLAKE2b-256 ef65128eb571e26bf9e8e8b39409b3ac1596334fd1acada6258d47dfcae1912d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page