Skip to content

Commit

Permalink
Merge pull request #54 from WMD-group/differentialAS
Browse files Browse the repository at this point in the history
First version with differential absorption spectra functionality.
  • Loading branch information
LucasGVerga authored Oct 20, 2023
2 parents e4dee3c + f0c7866 commit 0e20cae
Show file tree
Hide file tree
Showing 29 changed files with 731,543 additions and 176 deletions.
34 changes: 19 additions & 15 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ on:
workflow_dispatch:

jobs:
build-linux:
runs-on: ubuntu-latest
build:
strategy:
max-parallel: 5
fail-fast: false

matrix:
python-version: ['3.8', '3.9','3.10']
os: [ ubuntu-latest,macos-latest,windows-latest ]

name: Python ${{ matrix.python-version }} Test Pop
runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v3
Expand All @@ -36,10 +36,12 @@ jobs:
pip install numpy
pip install -e .
pip install -e .[tests]
- name: Check package versions
run: |
pip show -V pymatgen
pip show -V pytest
- name: Test
run: |
pytest tests/test_generator.py # test generator
Expand All @@ -49,14 +51,16 @@ jobs:
# to run the following image comparison tests and see relative differences, use the CLI
# pytest --mpl --mpl-generate-summary=html tests/test_plotter.py
# Download test plots
# - name: Archive test plots
# uses: actions/upload-artifact@v3
# with:
# name: output-plots
# path: tests/remote_baseline

# - name: Download a single artifact
# uses: actions/download-artifact@v3
# with:
# name: output-plots
- name: Generate GH Actions test plots
if: always() # always generate the plots, even if the tests fail
run: |
# Generate the test plots in case there were any failures:
pytest --mpl-generate-path=tests/remote_baseline_plots tests/test_plotter.py
# Upload test plots
- name: Archive test plots
if: always()
uses: actions/upload-artifact@v3
with:
name: output-plots
path: tests/remote_baseline_plots
11 changes: 6 additions & 5 deletions .github/workflows/pip_install_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ on:
- completed # only test when new release has been deployed to PyPI

jobs:
build-linux:
runs-on: ubuntu-latest
build:
if: ${{ github.event.workflow_run.conclusion == 'success' }}

strategy:
max-parallel: 5
fail-fast: false

matrix:
python-version: ['3.8', '3.9', '3.10']
python-version: [ '3.8', '3.9','3.10' ]
os: [ ubuntu-latest,macos-latest,windows-latest ]

name: Python ${{ matrix.python-version }} pip install
runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Change log
==========

v2.2.0
~~~~~~
- Initial version of differential absorption spectra (DAS) functionality.

v2.1.4
~~~~~~
- Addition of MAPI example outputs download instructions to DFT example by @youngwonwoo.
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

[Official Documentation](https://pytaser.readthedocs.io/en/latest/)

PyTASER is a Python (3.9+) library for simulating differential absorption in general, and transient absorption spectroscopy (TAS) in particular, features from quantum chemical calculations of crystals. The goal of this library is to simulate spectra for comparison with and interpretation of experiments. The main features include:
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:

* Spectra for insulating and semiconducting crystals
* Components from individual band-to-band transitions
* Spectra for different conditions: temperature and carrier concentrations
* Consideration of non-magnetic and magnetic materials
* Transient (TAS) and differential (DAS) absorption spectra for insulating and semiconducting crystals (using DFT or database calculations)
* Plotting contributions from individual band-to-band transitions
* TAS spectra for different conditions: temperature and carrier concentrations
* Customisable plotting.
* Capability to input calculated bandstructure and density of states inputs with support for the [Materials Project](https://materialsproject.org)

# Installation
Expand Down Expand Up @@ -95,4 +95,4 @@ Future topics we plan to build on:

# Acknowledgements

The project has been developed by @savya10, @kavanase and @youngwonwoo under the supervision of @utf and @aronwalsh.
The project has been developed by @savya10, @kavanase, @LucasGVerga and @youngwonwoo, under the supervision of @utf and @aronwalsh.
1 change: 0 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ numpy>=1.21
scipy
setuptools
monty
deepdiff
pytest-mpl
pytest
13 changes: 13 additions & 0 deletions docs/source/contributors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,17 @@ Additional contributions have been provided by:
:height: 16
:alt: GitHub commits from youngwonwoo

| **Lucas Verga** |LucasGVerga| |0000-0002-7453-238X|
| Postdoc, Imperial College London
.. |0000-0002-7453-238X| image:: _static/orcid.svg
:target: https://orcid.org/0000-0002-7453-238X
:width: 16
:height: 16
:alt: ORCID profile for 0000-0002-7453-238X
.. |LucasGVerga| image:: https://cdnjs.cloudflare.com/ajax/libs/octicons/8.5.0/svg/mark-github.svg
:target: https://github.com/LucasGVerga
:width: 16
:height: 16
:alt: GitHub profile for LucasGVerga

24 changes: 14 additions & 10 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,23 @@ Welcome to PyTASER's documentation!
Introduction
============

``PyTASER`` is a ``Python`` (3.9+) library built for simulating transient absorption spectroscopy (TAS) features from
DFT calculations. The goal of this library is to simulate TAS spectra for comparison with and interpretation of
experimental spectra. The main features include:

* An interactive TAS spectrum for a pristine semiconducting crystal
* Isolated spectra for individual band transitions
* Spectra for different conditions: temperature and carrier concentrations
* Consideration of non-magnetic and magnetic materials
``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 DFT or database calculations)
* Plotting contributions from individual band-to-band transitions
* TAS spectra for different conditions: temperature and carrier concentrations
* Customisable plotting.
* Capability to input calculated bandstructures and density of states inputs with support for https://materialsproject.org.

==========
Background
==========

TAS is a powerful pump-probe tool to characterise the excited states of materials. It can be used to understand microscopic processes in photochemical and electrochemical transformations, including phenomena such as electron trapping and carrier recombination.
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.

Expand Down Expand Up @@ -153,7 +155,9 @@ Future topics we plan to build on:
Acknowledgements
================

Developed by Savyasanchi Aggarwal, Seán Kavanagh, Youngwon Woo and Alex Ganose. Aron Walsh designed and led the project. Thanks to group members for their support, especially Anahita Manchala and Liam Harnett-Caulfield.
Developed by Savyasanchi Aggarwal, Seán Kavanagh, Lucas Verga, Youngwon Woo and Alex Ganose. Aron Walsh
designed and led the project. Thanks to group members for their support, especially Anahita Manchala and
Liam Harnett-Caulfield.


.. toctree::
Expand Down
14 changes: 8 additions & 6 deletions docs/source/pytaser.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ pytaser.generator module
:undoc-members:
:show-inheritance:

pytaser.das_generator module
---------------------

.. automodule:: pytaser.das_generator
:members:
:undoc-members:
:show-inheritance:

pytaser.kpoints module
-----------------------------

Expand All @@ -24,11 +32,5 @@ pytaser.plotter module
:undoc-members:
:show-inheritance:

pytaser.tas module
---------------------

.. automodule:: pytaser.tas
:members:
:undoc-members:
:show-inheritance:

Loading

0 comments on commit 0e20cae

Please sign in to comment.