ThermoParser

ThermoParser: Streamlined Analysis of Thermoelectric Properties - Published in JOSS (2024)

https://github.com/smtg-bham/thermoparser

Science Score: 100.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
    4 of 10 committers (40.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

chemistry computational-chemistry computational-materials-science materials materials-science matplotlib physics plotting python science thermoelectric tp

Scientific Fields

Mathematics Computer Science - 84% confidence
Last synced: 4 months ago · JSON representation ·

Repository

A tool for streamlining data analysis and visualisation for thermoelectrics and charge carrier transport in computational materials science.

Basic Info
Statistics
  • Stars: 52
  • Watchers: 7
  • Forks: 16
  • Open Issues: 1
  • Releases: 2
Topics
chemistry computational-chemistry computational-materials-science materials materials-science matplotlib physics plotting python science thermoelectric tp
Created over 5 years ago · Last pushed 8 months ago
Metadata Files
Readme License Citation

README.rst

.. image:: figures/tp-logo-header.png
    :alt: The ThermoParser logo, which looks like "TP"
    :target: https://smtg-bham.github.io/ThermoParser/
    :align: center

.. code-block::

     ________
    ///// \\\\
    \________/________________________________________________________________
    |_____                               : ___                                \
    | |   |                              :|   \                               /
    | |   |___   ___  |___  |_____   ___ :|___/  ___   |___   ___   ___  |___ \
    | |   |   | /   \ |   \ |  |  | /   \:|     /   |  |   \ /     /   \ |   \/
    | |   |   | |___/ |     |  |  | |   |:|     |   |  |     \___  |___/ |    \_____
    | |   |   | \___  |     |  |  | \___/:|     \___|_ |         \ \___  |    :3.3.0\
    |____________________________________:_______________________/____________:_____/


.. image:: https://github.com/SMTG-Bham/ThermoParser/actions/workflows/build.yml/badge.svg
    :alt: The build status badge
    :target: https://github.com/SMTG-Bham/ThermoParser/actions/workflows/build.yml

.. image:: https://github.com/SMTG-Bham/ThermoParser/actions/workflows/tests.yml/badge.svg
    :alt: The tests status badge
    :target: https://github.com/SMTG-Bham/ThermoParser/actions/workflows/tests.yml

.. image:: https://github.com/SMTG-Bham/ThermoParser/actions/workflows/docs.yml/badge.svg
    :alt: The docs status badge
    :target: https://smtg-bham.github.io/ThermoParser/

.. image:: https://joss.theoj.org/papers/10.21105/joss.06340/status.svg
   :alt: The JOSS publication badge
   :target: https://doi.org/10.21105/joss.06340

ThermoParser is a toolkit used to simplify the analysis of data
produced by specialist materials science codes, centred around
thermoelectrics, but also useful for anything pertaining to electronic
and/ or phononic transport. ThermoParser is a Python library which
contains functions for data retrieval, manipulation and plotting, which
can be easily used with a little Python knowlege to generate a wide
array of high-quality plots in only a few lines of code. ThermoParser
also contains a suite of command-line tools which can retrieve specific
data, save derived properties and plot graphs in a single command.

Click on the image to go to the `gallery`_!

.. image:: figures/wideband.png
   :alt: A phonon dispersion where widened bands show phonon scattering
   :target: https://smtg-bham.github.io/ThermoParser/gallery.html

.. _gallery: https://smtg-bham.github.io/ThermoParser/gallery.html

Installation
------------

ThermoParser can easily be installed with git and pip:

.. code-block:: bash

    git clone https://github.com/smtg-bham/ThermoParser.git
    cd ThermoParser
    pip install .

After installing, you may want to copy ``ThermoParser/tprc.yaml`` to
``~/.config/tprc.yaml``, if you want to set your own default axis
labels, unit conversions, default style sheets (two are provided),
other aesthetic alterations and more!

Mac
^^^

If installing on an m1 mac, you can't currently pip install h5py, so a
longer process is required:

0. Install brew
1. Install hdf5 with brew
2. ``python3 -m pip install cython numpy``
3. ``brew info hdf5`` to retrieve the path to your hdf5 install
4. ``HDF5_DIR=YOUR_HDF5_PATH --no-build-isolation h5py``
5. ``git clone https://github.com/smtg-bham/ThermoParser.git``
6. ``cd ThermoParser``
7. ``pip install --user -e .``

Using conda may circumvent this process.

Command Line Interface (CLI)
----------------------------

ThermoParser uses `click`_, which has an easily navigable structure
from the command-line, detailed in the `tutorials`_.
The most frequently useful commands are included in the CLI for maximum
ease, including the ``tp get`` functions, which verbosely retrieve data
from files which are normally tiresome and error-prone to navigate; and
most of the simplest plot-types available through the Python interface.

Python Interface
----------------

ThermoParser is designed to have four main stages:

#. *Axes*:
     Pick an axis layout from ``tp.axes``.
#. *Load*:
     Use the functions is ``tp.data.load`` to load the relevant data.
#. *Add*:
     Use functions in ``tp.plot`` modules to add graphs to the axes.
#. *Save*:
     Use ``plt.savefig`` or equivalent to produce the figure.

As ThermoParser is dependent on matplotlib, each stage can be
substituted with bespoke code, e.g. using ``matplotlib.pyplot.subplots``
or ``matplotlib.axes.Axes.scatter``. These can still be supplemented
with ThermoParser helper functions, such as default labels which the
user can set in ``tp.settings``, colourmap generators in
``tp.plot.colour`` or legend helpers such as ``tp.axes.legend.alphabetise``.

The best way to get a feel for ThermoParser is to see it in action:
Take a look at our  `examples`_ and `tutorials`_. Currently supported
codes are:

.. _examples: https://github.com/smtg-bham/ThermoParser/tree/master/examples
.. _tutorials: https://smtg-bham.github.io/ThermoParser/tutorials.html

* Phononic properties:

  * `Phonopy `_
  * `Phono3py `_

* Electronic properties:

  * `AMSET `_
  * `BoltzTraP `_

Current plotting modes are split into four areas.

* ``tp.plot.phonons`` contains plots along a high-symmetry path,
  including phonon dispersions and plots which project other quantities
  onto these paths in various ways.
* ``tp.plot.frequency`` plots frequency on the x-axis, including density
  of states (DoS), cumulative kappa, "waterfall" and density plots.
  Each function has a ``main`` argument, which can be useful when
  plotting multiple quantities on the same set of axes; and an
  ``invert`` argument, which swaps the x and y axes to let you plot
  DoS-style next to a ``tp.plot.phonons`` plot.
* ``tp.plot.mfp`` contains a cumulative kappa against mean free path
  plot.
* ``tp.plot.heatmap`` contains a heatmap plotter, and wrappers which
  format appropriately for ZT against temperature and doping
  concentration; and one which plots the lattice thermal conductivity
  required to reach a target ZT, again against temperature and doping.

A set of example scripts is provided in the ``tp/examples`` folder and
in our online `examples`_, and there is `documentation`_.

Contributing
------------

We welcome any contributions, whether they be a feature request or a new
piece of code (or anything else). Adding options is inteded to be
straightforward; the modularity of the code means that each step is mostly
independent of the others.

Bugs and feature requests can be submitted to the `issue tracker`_,
while contributions can be made using the `fork and pull`_ approach.
Contributions should include comprehensive docstrings, and where
appropriate `examples`_, further `documentation`_ and `tests`_ are greatly
appreciated. Documentation uses the `sphinx`_ package, and can be built from
the ``docs`` directory with ``sphinx-build -b html src/ .``. In order to build
the docs, download the extra dependencies with, e.g., ``pip install .[docs]``
from the ThermoParser directory.

.. _issue tracker: https://github.com/smtg-bham/ThermoParser/issues
.. _fork and pull: https://guides.github.com/activities/forking
.. _documentation: https://smtg-bham.github.io/ThermoParser/
.. _tests: https://github.com/smtg-bham/ThermoParser/tree/master/tests

Testing
-------

Tests use the `unittest`_ package, and can be run from the test directory
with ``python3 -m unittest``. If you don't already have unittest installed, it
can be directly with ``pip install unitest`` or, e.g., ``pip install .[tests]``
from the ThermoParser directory.

.. _unittest: https://docs.python.org/3/library/unittest.html

Contributors
------------

Many thanks to all those who contributed code or ideas to ThermoParser!
Roughly chronologically, they are so far:

* Kieran B. Spooner
* Maud Einhorn
* David O. Scanlon
* Daniel W. Davies
* Bonan Zhu
* Sean R. Kavanagh
* Warda Rahim
* Katarina Brlec
* Joe Willis
* Dale Gaines II

Thanks also to the `JOSS`_ reviewers, Evan Walter Clarke
Spotte-Smith, Enric Tomás Grau-Luque, and Francesco Nattino; and the
editor Mojtaba Barzegari. An unintimidating and productive review
process, which I would recommend if the opportunity arises!

.. _JOSS: https://joss.theoj.org/

License
-------

ThermoParser is licensed under the GNU Affero General Public License v3
(AGPLv3).

Requirements
------------

ThermoParser uses the following open-source packages:

* `click `_
* `h5py `_
* `json `_
* `matplotlib `_
* `numpy `_
* `pymatgen `_
* `scipy `_
* `sphinx `_
* `yaml `_

Owner

  • Name: Scanlon Materials Theory Group
  • Login: SMTG-Bham
  • Kind: organization
  • Location: UCL, UK

JOSS Publication

ThermoParser: Streamlined Analysis of Thermoelectric Properties
Published
May 25, 2024
Volume 9, Issue 97, Page 6340
Authors
Kieran B. Spooner
School of Chemistry, University of Birmingham, Birmingham B15 2TT, United Kingdom, Department of Chemistry, University College London, 20 Gordon Street, London WC1H 0AJ, United Kingdom, Thomas Young Centre, University College London, Gower Street, London WC1E 6BT, United Kingdom
Maud Einhorn
Department of Chemistry, University College London, 20 Gordon Street, London WC1H 0AJ, United Kingdom, Thomas Young Centre, University College London, Gower Street, London WC1E 6BT, United Kingdom
Daniel W. Davies
Department of Chemistry, University College London, 20 Gordon Street, London WC1H 0AJ, United Kingdom, Thomas Young Centre, University College London, Gower Street, London WC1E 6BT, United Kingdom
David O. Scanlon
School of Chemistry, University of Birmingham, Birmingham B15 2TT, United Kingdom, Department of Chemistry, University College London, 20 Gordon Street, London WC1H 0AJ, United Kingdom, Thomas Young Centre, University College London, Gower Street, London WC1E 6BT, United Kingdom
Editor
Mojtaba Barzegari ORCID
Tags
Matplotlib thermoelectrics electronic properties transport properties materials science chemistry physics science data analysis plotting

Citation (citation.cff)

cff-version: "1.2.0"
authors:
- family-names: Spooner
  given-names: Kieran B.
- family-names: Einhorn
  given-names: Maud
- family-names: Davies
  given-names: Daniel W.
- family-names: Scanlon
  given-names: David O.
doi: 10.5281/zenodo.10987923
message: If you use this software, please cite our article in the
  Journal of Open Source Software.
preferred-citation:
  authors:
  - family-names: Spooner
    given-names: Kieran B.
  - family-names: Einhorn
    given-names: Maud
  - family-names: Davies
    given-names: Daniel W.
  - family-names: Scanlon
    given-names: David O.
  date-published: 2024-05-25
  doi: 10.21105/joss.06340
  issn: 2475-9066
  issue: 97
  journal: Journal of Open Source Software
  publisher:
    name: Open Journals
  start: 6340
  title: "ThermoParser: Streamlined Analysis of Thermoelectric
    Properties"
  type: article
  url: "https://joss.theoj.org/papers/10.21105/joss.06340"
  volume: 9
title: "ThermoParser: Streamlined Analysis of Thermoelectric Properties"

GitHub Events

Total
  • Issues event: 2
  • Watch event: 8
  • Issue comment event: 3
  • Push event: 6
  • Pull request event: 16
  • Fork event: 1
  • Create event: 1
Last Year
  • Issues event: 2
  • Watch event: 8
  • Issue comment event: 3
  • Push event: 6
  • Pull request event: 16
  • Fork event: 1
  • Create event: 1

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 282
  • Total Committers: 10
  • Avg Commits per committer: 28.2
  • Development Distribution Score (DDS): 0.571
Past Year
  • Commits: 12
  • Committers: 2
  • Avg Commits per committer: 6.0
  • Development Distribution Score (DDS): 0.417
Top Committers
Name Email Commits
Kieran B Spooner 3****r 121
Kieran B. Spooner k****4@u****k 113
Dan Davies d****9@g****m 23
Maud Einhorn m****2@u****k 12
Dale Gaines d****i@g****m 5
Warda Rahim u****a@u****k 4
alexsquires a****s@g****m 1
Bonan Zhu 3****n 1
Kieran Spooner z****s@l****k 1
Daniel Davies d****n@D****l 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 18
  • Total pull requests: 92
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 3 days
  • Total issue authors: 7
  • Total pull request authors: 7
  • Average comments per issue: 1.83
  • Average comments per pull request: 0.22
  • Merged pull requests: 88
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 14
  • Average time to close issues: N/A
  • Average time to close pull requests: 12 days
  • Issue authors: 1
  • Pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.36
  • Merged pull requests: 14
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • fnattino (10)
  • kbspooner (2)
  • DFT13 (2)
  • brlec (1)
  • kavanase (1)
  • DebugDax (1)
  • akentphonon (1)
  • enricgrau (1)
Pull Request Authors
  • kbspooner (91)
  • dgaines2 (6)
  • maudeinhorn (4)
  • dandavies99 (1)
  • warda-rahim (1)
  • zhubonan (1)
  • mbarzegary (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

requirements.txt pypi
  • click *
  • h5py *
  • matplotlib *
  • numpy >=1.14.3
  • pymatgen >=2020.1.28
  • pyyaml *
  • scipy *
  • sphinx *
setup.py pypi
  • click *
  • h5py *
  • matplotlib *
  • numpy *
  • pymatgen *
  • pyyaml *
  • scipy *
.github/workflows/build.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
.github/workflows/docs.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
  • peaceiris/actions-gh-pages v3 composite
.github/workflows/tests.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite