pymatgen-analysis-defects

pymatgen-analysis-defects: A Python package for analyzing point defects in crystalline materials - Published in JOSS (2024)

https://github.com/materialsproject/pymatgen-analysis-defects

Science Score: 95.0%

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

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

Keywords from Contributors

meshing fem finite-elements standardization parallel hydrology ode finite-element-methods materials-science pypy

Scientific Fields

Materials Science Physical Sciences - 34% confidence
Last synced: 4 months ago · JSON representation

Repository

Defect analysis modules for pymatgen

Basic Info
Statistics
  • Stars: 54
  • Watchers: 8
  • Forks: 13
  • Open Issues: 5
  • Releases: 63
Created almost 4 years ago · Last pushed 5 months ago
Metadata Files
Readme License Code of conduct

README.md

pymatgen-analysis-defects

testing codecov zenodo pypi

Full Documentation Paper

This package is an extension to pymatgen for performing defect analysis. The package is designed to work with VASP inputs and output files and is meant to be used as a namespace package extension to the main pymatgen library. The new module has been redesigned to work closely with atomate2.

While the atomate2 automation framework is not required for this code to be useful, users are strongly encouraged to to adopt the atomate2 framework as it contains codified \"best practices\" for running defect calculations as well as orchestrating the running of calculations and storing the results.

The package serves as an object-oriented interface to defect physics and is capable of generating a list of non-equivalent defect objects directly from the Materials Project API.

python from pymatgen.analysis.defects.generators import ChargeInterstitialGenerator, generate_all_native_defects from pymatgen.ext.matproj import MPRester with MPRester() as mpr: chgcar = mpr.get_charge_density_from_material_id("mp-804") for defect in generate_all_native_defects(chgcar): print(defect)

Non-exhaustive list of features:

Reproducible definition of defects

Defects are defined based on the physical concept they represent, independent of the calculation details such as simulation cell size. As an example, a Vacancy defect is defined by the primitive cell of the pristine material plus a single site that represents the vacancy site in the unit cell.

Formation energy calculations

The formation energy diagram is a powerful tool for understanding the thermodynamics of defects. This package provides a simple interface for calculating the formation energy diagram from first-principles results. This package handles the energy accounting of the chemical species for the chemical potential calculations, which determines the y-offset of the formation energy. This package also performs finite-size corrections for the formation energy which is required when studying charged defects in periodic simulation cells.

Defect Position

Identification of the defect positions in a simulation cell after atomic relaxation is not trivial since the many atoms can collectively shift in response to the creation of the defect. Yet the exact location of the defect is required for the calculation of finite-size corrections as well as other physical properties. We devised a method based on calculating a SOAP-based distortion field that can be used to identify the defect position in a simulation cell. Note, this method only requires the reference pristine supercell and does not need prior knowledge of how the defect was created.

Defect Complexes

Multiple defects can be composed into defect complexes. The complex is can be treated as a normal defect object for subsequent analysis.

Defect Interactions

Simulation of defect-photon and defect-phonon interactions under the independent particle approximation.

Previous versions of the defects code

This package replaces the older pymatgen.analysis.defects modules. The previous module was used by pyCDT code which will continue to work with version 2022.7.8 of pymatgen.

Contributing

The source code can be downloaded from the GitHub repository at

bash $ git clone https://github.com/materialsproject/pymatgen-analysis-defects.git

All code contributions are welcome. Please submit a pull request on GitHub. To make maintenance easier, please use a workflow similar to the automated CI workflow.

Specifically, please make sure to run the following commands for linting:

bash $ pip install -e .[strict] $ pip install -e .[dev] $ pre-commit install $ pre-commit run --all-files

And run these commands for testing:

bash $ pip install -e .[strict] $ pip install -e .[tests] $ pytest --cov=pymatgen $ pytest --nbmake ./docs/source/content

For more details about what is actually installed with each of the pip install .[arg] commands, please inspect the pyproject.toml file.

Contributors

  • Lead developer: Dr. Jimmy-Xuan Shen
  • This code contains contributions from the original defects analysis module of pymatgen from Dr. Danny Broberg and Dr. Shyam Dwaraknath.

Owner

  • Name: Materials Project
  • Login: materialsproject
  • Kind: organization
  • Email: feedback@materialsproject.org
  • Location: 1 Cyclotron Rd, Berkeley CA 94720

JOSS Publication

pymatgen-analysis-defects: A Python package for analyzing point defects in crystalline materials
Published
January 19, 2024
Volume 9, Issue 93, Page 5941
Authors
Jimmy-Xuan Shen ORCID
Lawrence Livermore National Laboratory, Livermore, California 94550, United States
Joel Varley ORCID
Lawrence Livermore National Laboratory, Livermore, California 94550, United States
Editor
Rachel Kurchin ORCID
Tags
python materials science point defects finite-size corrections database building

GitHub Events

Total
  • Create event: 4
  • Issues event: 3
  • Release event: 2
  • Watch event: 13
  • Delete event: 4
  • Issue comment event: 19
  • Push event: 84
  • Pull request review event: 5
  • Pull request review comment event: 8
  • Pull request event: 20
  • Fork event: 3
Last Year
  • Create event: 4
  • Issues event: 3
  • Release event: 2
  • Watch event: 13
  • Delete event: 4
  • Issue comment event: 19
  • Push event: 84
  • Pull request review event: 5
  • Pull request review comment event: 8
  • Pull request event: 20
  • Fork event: 3

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 821
  • Total Committers: 10
  • Avg Commits per committer: 82.1
  • Development Distribution Score (DDS): 0.175
Past Year
  • Commits: 11
  • Committers: 4
  • Avg Commits per committer: 2.75
  • Development Distribution Score (DDS): 0.636
Top Committers
Name Email Commits
@jmmshn j****n@g****m 677
nwinner n****r@b****u 48
dependabot[bot] 4****] 38
pre-commit-ci[bot] 6****] 36
Seán Kavanagh 5****e 11
Patrick Huck p****k@l****v 4
github-actions[bot] 4****] 3
Janosh Riebesell j****l@g****m 2
Kyle Niemeyer k****r@f****m 1
Jinzhe Zeng j****g@r****u 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 21
  • Total pull requests: 135
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 21 days
  • Total issue authors: 15
  • Total pull request authors: 9
  • Average comments per issue: 2.95
  • Average comments per pull request: 1.21
  • Merged pull requests: 108
  • Bot issues: 0
  • Bot pull requests: 61
Past Year
  • Issues: 3
  • Pull requests: 10
  • Average time to close issues: N/A
  • Average time to close pull requests: about 2 months
  • Issue authors: 3
  • Pull request authors: 4
  • Average comments per issue: 1.0
  • Average comments per pull request: 1.6
  • Merged pull requests: 6
  • Bot issues: 0
  • Bot pull requests: 5
Top Authors
Issue Authors
  • misaraty (3)
  • ireaml (2)
  • kavanase (2)
  • njzjz (2)
  • AlexHeustc (1)
  • mwswift (1)
  • kinziefarnell (1)
  • msehabibur (1)
  • yliu1240 (1)
  • Luftalian (1)
  • kayahans (1)
  • whyydsforever (1)
  • JiQi535 (1)
  • Andrew-S-Rosen (1)
  • yayapa (1)
Pull Request Authors
  • jmmshn (58)
  • dependabot[bot] (39)
  • pre-commit-ci[bot] (21)
  • nwinner (8)
  • kavanase (7)
  • github-actions[bot] (5)
  • janosh (2)
  • tschaume (1)
  • kyleniemeyer (1)
  • njzjz (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (44) documentation (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 240,484 last-month
  • Total dependent packages: 10
  • Total dependent repositories: 2
  • Total versions: 54
  • Total maintainers: 1
pypi.org: pymatgen-analysis-defects

Pymatgen extension for defects analysis

  • Versions: 54
  • Dependent Packages: 10
  • Dependent Repositories: 2
  • Downloads: 240,484 Last month
Rankings
Dependent packages count: 1.0%
Downloads: 4.0%
Average: 5.5%
Dependent repos count: 11.5%
Maintainers (1)
Last synced: 4 months ago

Dependencies

.github/workflows/python-publish.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/testing.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • codecov/codecov-action v1 composite
  • peaceiris/actions-gh-pages v3 composite
.github/workflows/update-precommit.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • peter-evans/create-pull-request v3 composite
docs/source/requirements.txt pypi
  • jupyter-book *
  • matplotlib *
  • numpy *
pyproject.toml pypi
  • pymatgen >=2022.10.22
  • scikit-image >=0.19.3
tests/pyproject.toml pypi