effmass

effmass: An effective mass package - Published in JOSS (2018)

https://github.com/lucydot/effmass

Science Score: 98.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 5 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: arxiv.org, scholar.google, joss.theoj.org, zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords from Contributors

computational-chemistry

Scientific Fields

Chemistry Physical Sciences - 83% confidence
Last synced: 4 months ago · JSON representation ·

Repository

Calculates various definitions of effective mass from the electronic bandstructure of a semiconductor.

Basic Info
Statistics
  • Stars: 81
  • Watchers: 6
  • Forks: 41
  • Open Issues: 15
  • Releases: 12
Created over 7 years ago · Last pushed 8 months ago
Metadata Files
Readme License Code of conduct Citation

README.md

Effmass

PyPI version Documentation Status Tests Status Test Coverage DOI License: MIT JOSS status OpenSSF Best Practices fair-software.eu

💃 31/5/23: Effmass-2.3.1 has been released!!
💃 Effmass now has more options for locating extrema of a particular type: by direction or band type (conduction/valence/frontier).
⚠️ The Data class was renamed DataVasp in effmass versions 2.0.0+. You may need to update your scripts!

effmass is a peer-reviewed Python (3.6+) package for calculating various definitions of effective mass from the electronic bandstructure of a semiconducting material. It consists of a core Segment class that calculates the effective mass and other associated properties of selected bandstructure segments. The programme also contains functions for locating bandstructure extrema, constructing segments and plotting approximations to the dispersion. There is a command line interface for calculating parabolic effective mass values, and an API for the more complex, non-parabolic definitions of effective mass.

If you use effmass for your published research please cite accordingly.

What's new?

💃 effmass now has more options for locating extrema of a particular type: by direction or band type (conduction/valence/frontier). There are updated usage examples in the tutorial.

💃 effmass now interfaces with more codes: - it can read in Castep output data (in addition to Vasp and FHI-aims) - it can work with ASE bandstructure objects (see an example of using this with Quantum Espresso output here) - it can work with Octopus output files

💃 effmass now includes a command line interface

As a result of these changes, and with view to supporting more DFT codes in the future, the Data class has been renamed to DataVasp ⚠️ On updating to the latest version of effmass you may need to update your scripts / Jupyter Notebook to reflect this change ⚠️

Features

effmass can:

Read in a bandstructure: It is assumed you have used a DFT calculator to walk through a 1D slice of the Brillouin Zone, capturing the maxima and minima of interest. effmass uses the Python package vasppy for parsing VASP output.

Locate extrema: These correspond to the valence band maxima and conduction band minima. Maxima and minima within a certain energy range can also be located.

Calculate curvature, transport and optical effective masses: The curvature (aka inertial) and transport masses are calculated using the derivatives of a fitted polynomial function. The optical effective mass can also be calculated assuming a Kane dispersion.

Assess the extent of non-parabolicity: Parameters of the Kane quasi-linear dispersion are calculated to quantify the extent of non-parabolicity over a given energy range.

Calculate the quasi-fermi level for a given carrier concentration: Using density-of-states data and assuming no thermal smearing, effmass can calculate the energy to which states are occupied. This is a useful approximation to the quasi-Fermi level. Note: this is only supported for VASP and requires the output file DOSCAR.

Plot fits to the dispersion: Selected bandstructure segments and approximations to the dispersion (assuming a Kane, quadratic, or higher order fit) can be visualised.

Depending on the functionality and level of approximation you are looking for, it may be that one of the packages listed here will suit your needs better.

Supported Codes

effmass currently supports VASP, FHI-Aims, Castep, ASE, and Octopus. In the near future we hope to play nicely with other codes that interface with the ASE bandstructure class, and pymatgen. We especially welcome contributions that will help make effmass available to more researchers.

Inter-operability with ASE

If you can create an ASE bandstructure object (with the energies and path specified) and an ASE atoms object (with the reciprocal lattice), you should be able to use effmass code.

The inputs.DataASE class can be used to create an inputs.Data instance using an ASE bandstructure object and ASE atoms object. Once you have inputs.Data you can use the standard workflow as outlined in the tutorial.

Note that the DataASE class does not read in occupancy data, so the CBM/VBM are inferred from the position of the Fermi level. It may be that you need to manually set this via the Data.fermi_energy attribute and then re-find the CBM/VBM using the Data.find_cbm_vbm method.

An example of how to use effmass with Quantum Espresso output is below. Here bs_calc.log is the log file for a calculation performed with calculation_mode=‘bands’, and scf_calc.log is the log file for a self-consistent calculation to get the fermi energy:

``` from effmass import inputs, extrema, outputs from ase.io import read

atoms=read('bscalc.log',format='espresso-out') bs=atoms.calc.bandstructure()

calcscf=read('scfcalc.log',format='espresso-out')

data=inputs.DataASE(bs,atoms) data.fermienergy=calcscf.calc.eFermi data.findcbmvbm()

settings = inputs.Settings(extremasearchdepth=0.075, energyrange=0.25) segments = extrema.generatesegments(settings,data) outputs.plot_segments(data,settings,segments) ```

Other effective mass codes

There are other codes that can calculate effective mass. The best effective mass code depends on your use case. - You may find Sumo bandstats easier to use if you are looking for a basic parabolic fit. - Amset can be used to calculate the effective mass across the whole Brillouin Zone (useful if your CBM/VBM is not at a high symmetry point, for example). Further details can be found on MatSci discussion forum here

You may find that someone else has already calculated the effective mass you need - there are 10,000's DFT-calculated effective mass values on MPContribs here.

Installation

effmass can be installed using the Python package manager pip:

pip install effmass

If you use conda/anaconda, the safest thing to do is to create a new environment and then install effmass:

conda create -n effmass python conda activate effmass pip install effmass

If you wish, you can install the very latest version of effmass from GitHub with the commands below. Note: The latest GitHub version may include more features and data format support that the latest release, but it is not a stable release, so may have more issues than usual. If you are unsure, use one of the above install methods instead.

git clone https://github.com/lucydot/effmass.git cd effmass pip install .

Command Line Interface

The command line interface provides basic functionality for calculating parabolic effective masses. For those who have a basic familiarity with Python there is an API which provides access to all features, including non-parabolic effective mass definitions.

To start the command line interface simply type

effmass

and follow the prompts. You are asked if you would like to print a plot of the segments found - we recommend that you do this, to check that the segments are "sensible". You are also asked if you would like to print a summary file - again, we recommend that you do this, so that you have a record of the CLI options chosen.

Documentation

  • An overview of the features of effmass, along with example code for Vasp and FHI-aims output data, is contained in a Jupyter notebook here.
  • Additional Jupyter notebook examples for the Castep and ASE interfaces are here.
  • The API documentation is here.
  • Further details about the various effective mass definitions implemented in effmass can be found in Phys. Rev. B 99 (8), 085207, which is also available on arXiv.
  • The source code is available as a git repository at https://github.com/lucydot/effmass.

Running notebook examples

If you want to run the jupyter notebook examples/tutorials you will also need to install notebook:

pip install notebook

To run the notebook, run the following command at the Terminal (Mac/Linux) or Command Prompt (Windows):

jupyter notebook

This will open a web browser tab, which you can use to navigate to the notebook examples.

Publications using effmass

Over 50 publications have used effmass (according to citation data).

effmass was initially developed for work published as Impact of nonparabolic electronic band structure on the optical and transport properties of photovoltaic materials Phys. Rev. B 99 (8), 085207. This paper is also avaiable on arXiv. The paper directory contains the Vasp input data (POSCAR), Vasp output data (OUTCAR/PROCAR) and band structures generated for this study.

Citing effmass

If you use this code in your research, please cite the following paper:

Whalley, Lucy D. (2018). effmass - an effective mass package. The Journal of Open Source Software, 3(28) 797. Link to paper here.

Bibtex

@misc{Whalley_JOSS2018, author = {Lucy D. Whalley}, title = {effmass: An effective mass package}, volume = {3}, issue = {28}, pages = {797}, month = {Aug}, year = {2018}, doi = {10.21105/joss.00797}, url = {http://joss.theoj.org/papers/10.21105/joss.00797} }

Questions, bug reports, feature requests

Please use the Github issue tracker for any questions, feature requests or bug reports. Please do not contact the developers via email unless there is a specific reason you do not want the conversation to be public. If we do not respond within a reasonable timeframe, then please feel free to reach out to Lucy via email; Github notifications have a nasty habit of getting lost.

Development

If you would like to contribute please do so via a pull request. All contributors must read and respect the code of conduct. In particular, we welcome contributions which would extend effmass so that it is able to parse output from other electronic structure codes.

Version numbers

For versioning we are following the guidelines here. This allows automatic versioning according to the latest tag on Github.

Test PYPI

When testing a build on the test PYPI site it is important to point to the actual PYPI for the dependencies..its a GOTCHA... pip install -i https://pypi.org/pypi/ --extra-index-url https://test.pypi.org/simple effmass==2.3.4.dev3

Tests

Automated testing of the latest commit happens here.

You can also run tests locally: pip install effmass[tests] cd effmass python -m pytest

Contributors

Lead developer: Lucy Whalley, a.k.a lucydot

Contributors:
Roberto D'Agosta (test data for Quantum Espresso compatibility via ASE), profile //
Eisuke Kawashima (tests), a.k.a e-kwsm //
Florian Knoop (bugs, tweaks and script improvements), a.k.a flokno //
William Taylor (auto-versioning and build system requirements), a.k.a musicmrman99 //
Austin Fatt (support for Ocotpus), a.k.a afatt //
Matthias Goloumb (Support for FHI-Aims), a.k.a MatthiasGolomb //
Katarina Brlec (Support for vasprun files) a.k.a brlec //
Sean Kavanagh (Documentation), a.k.a kavanase //
Benjamin Morgan (Vasppy compatability), a.k.a bjmorgan //

Owner

  • Name: Lucy Whalley
  • Login: lucydot
  • Kind: user
  • Location: Newcastle, UK
  • Company: Northumbria University

Assistant professor: Materials Physics + Renewable Energy + Software Engineering

JOSS Publication

effmass: An effective mass package
Published
August 07, 2018
Volume 3, Issue 28, Page 797
Authors
Lucy D. Whalley ORCID
Department of Materials, Imperial College London, London, United Kingdom
Editor
Kathryn Huff ORCID
Tags
materials science DFT

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: effmass
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Lucy
    name-particle: Lucy
    family-names: Whalley
    email: l.whalley@northumbria.ac.uk
    affiliation: >-
      Department of Materials, Imperial College London,
      London, United Kingdom
    orcid: 'https://orcid.org/0000-0002-2992-9871'
identifiers:
  - type: doi
    value: 10.21105/joss.00797
    description: Publication with the Journal of Open Source Software
repository-code: 'https://github.com/lucydot/effmass'
abstract: >-
  effmass is a peer-reviewed Python package for calculating
  various definitions of effective mass from the electronic
  bandstructure of a semiconducting material.
keywords:
  - electronic structure
  - materials science
  - condensed matter
license: MIT
commit: dac39d4
version: 2.3.0
date-released: '2023-05-31'

GitHub Events

Total
  • Issues event: 3
  • Watch event: 8
  • Issue comment event: 3
  • Push event: 4
  • Fork event: 2
Last Year
  • Issues event: 3
  • Watch event: 8
  • Issue comment event: 3
  • Push event: 4
  • Fork event: 2

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 425
  • Total Committers: 11
  • Avg Commits per committer: 38.636
  • Development Distribution Score (DDS): 0.108
Past Year
  • Commits: 5
  • Committers: 1
  • Avg Commits per committer: 5.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
lucydot l****y@g****m 379
Matthias Golomb m****2@g****m 11
William Taylor w****v@g****m 10
austinfatt a****0@g****m 6
Florian Knoop f****p@l****e 5
Benjamin Morgan b****2@g****m 5
Matthias Golomb m****b@M****l 5
brlec 4****c 1
Seán Kavanagh 5****e 1
Eisuke Kawashima e****m 1
Lucy Whalley m****8@c****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 47
  • Total pull requests: 20
  • Average time to close issues: 10 months
  • Average time to close pull requests: 24 days
  • Total issue authors: 21
  • Total pull request authors: 9
  • Average comments per issue: 2.94
  • Average comments per pull request: 0.75
  • Merged pull requests: 16
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • lucydot (17)
  • ajjackson (7)
  • ghost (3)
  • MariaEstRo (2)
  • rightsuman (2)
  • hongyi-zhao (1)
  • grayfaraday (1)
  • OldrayHex (1)
  • derLeere (1)
  • akentphonon (1)
  • jnluy (1)
  • haiyuanwang2020 (1)
  • SUN123RAY (1)
  • isabelmoib (1)
  • FPrith (1)
Pull Request Authors
  • MatthiasGolomb (5)
  • lucydot (4)
  • musicmrman99 (3)
  • afatt (3)
  • brlec (1)
  • kavanase (1)
  • bjmorgan (1)
  • e-kwsm (1)
  • flokno (1)
Top Labels
Issue Labels
enhancement (8) good first issue (3) documentation (3) question (2) maintenance (2) bug (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 152 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 13
  • Total maintainers: 1
pypi.org: effmass

An effective mass package

  • Versions: 13
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 152 Last month
Rankings
Forks count: 6.5%
Stargazers count: 8.8%
Dependent packages count: 10.1%
Average: 13.5%
Downloads: 20.6%
Dependent repos count: 21.6%
Maintainers (1)
Last synced: 4 months ago

Dependencies

requirements.txt pypi
  • adjustText *
  • ase >=3.21.1
  • codeclimate-test-reporter *
  • coverage ==4.3.4
  • matplotlib *
  • numpy *
  • octopuspy >=1.0.2
  • prettytable >=2.1.0
  • pytest-lazy-fixture *
  • questionary >=1.9.0
  • scipy *
  • vasppy >=0.5.0.0
.github/workflows/fair-software.yml actions
  • fair-software/howfairis-github-action main composite