Package: pytaser
PyTASEROfficial DocumentationPyTASERis aPythonlibrary 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 conditionsSeparation of spectral contributions from individual band-to-band transitionsIntegration with the Materials Project database, allowing support for non-locally calculated materialsAbility 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 packagepymatgen.Currently compatible with VASP, while support for other electronic structure codes is planned – if you have a specific request, please open an issue!BackgroundTAS 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.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 methodInstallationTo install the module withpip(recommended):pip install pytaserTo install directly from the git repository:pip install git+https://github.com/WMD-group/PyTASERAlternativelypython setup.py installcan also be used.PyTASER is compatible with Python 3.9+ and relies on a number of open-source packages, specifically:pymatgennumpy,scipyfor data structures and unit conversionmatplotlibfor plotting the spectraDeveloper’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/PyTASERNavigate to root directory:cd PyTASERInstall the code with the command:pip install -e .This command tries to obtain the required packages and their dependencies and install them automatically.VisualisationThe recommended approach is to usePyTASERwithin an interactive python environment (such as a Jupyter Notebook), as shown in thetutorialson the docs and theexamplesfolder.
Alternatively, you can usePyTASERthrough python scripts (e.g. withpython <filename.py>).If using your own, locally calculated data, please followthisworkflow.
Otherwise, use the MP-integrated workflowhere.ContributingWe appreciate any contributions in the form of a pull request. Please see theContributingdocumentation for more details.
Additional analysis/example spectra performed withPyTASERwould be welcomed.Please feel free to reach out to us via theIssue Trackerif there are any questions or suggestions.TestingUnit tests are in thetestsdirectory and can be run from the top directory usingpytest. 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 WorkFuture 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 kineticsIncorporating spin-flip processes for spin-polarised systemsDescription of defective crystalsAcknowledgementsThe project has been developed by @savya10, @kavanase, @LucasGVerga and @youngwonwoo, under the supervision of @utf and @aronwalsh.