Skip to main content

Python Materials Genomics is a robust materials analysis code that defines core object representations for structures

Project description

Logo

CI Status codecov PyPI Downloads Conda Downloads Requires Python 3.10+ Paper

Pymatgen (Python Materials Genomics) is a robust, open-source Python library for materials analysis. These are some of the main features:

  1. Highly flexible classes for the representation of Element, Site, Molecule and Structure objects.
  2. Extensive input/output support, including support for VASP, ABINIT, CIF, Gaussian, XYZ, and many other file formats.
  3. Powerful analysis tools, including generation of phase diagrams, Pourbaix diagrams, diffusion analyses, reactions, etc.
  4. Electronic structure analyses, such as density of states and band structure.
  5. Integration with the Materials Project REST API.

Pymatgen is free to use. However, we also welcome your help to improve this library by making your contributions. These contributions can be in the form of additional tools or modules you develop, or feature requests and bug reports. The following are resources for pymatgen:

Why use pymatgen?

  1. It is (fairly) robust. Pymatgen is used by thousands of researchers and is the analysis code powering the Materials Project. The analysis it produces survives rigorous scrutiny every single day. Bugs tend to be found and corrected quickly. Pymatgen also uses Github Actions for continuous integration, which ensures that every new code passes a comprehensive suite of unit tests.
  2. It is well documented. A fairly comprehensive documentation has been written to help you get to grips with it quickly.
  3. It is open. You are free to use and contribute to pymatgen. It also means that pymatgen is continuously being improved. We will attribute any code you contribute to any publication you specify. Contributing to pymatgen means your research becomes more visible, which translates to greater impact.
  4. It is fast. Many of the core numerical methods in pymatgen have been optimized by vectorizing in numpy/scipy. This means that coordinate manipulations are fast. Pymatgen also comes with a complete system for handling periodic boundary conditions.
  5. It will be around. Pymatgen is not a pet research project. It is used in the well-established Materials Project. It is also actively being developed and maintained by the Materials Virtual Lab, the ABINIT group and many other research groups.
  6. A growing ecosystem of developers and add-ons. Pymatgen has contributions from materials scientists all over the world. We also now have an architecture to support add-ons that expand pymatgen's functionality even further. Check out the contributing page and add-ons page for details and examples.

Installation

The version at the Python Package Index PyPI is always the latest stable release that is relatively bug-free and can be installed via pip:

pip install pymatgen

If you'd like to use the latest unreleased changes on the main branch, you can install directly from GitHub:

pip install -U git+https://github.com/materialsproject/pymatgen

The minimum Python version is 3.10. Some extra functionality (e.g., generation of POTCARs) does require additional setup (see the pymatgen docs).

Change Log

See GitHub releases, docs/CHANGES.md or commit history in increasing order of details.

Using pymatgen

Please refer to the official pymatgen docs for tutorials and examples. Dr Anubhav Jain (@computron) has also created a series of tutorials and YouTube videos, which is a good resource, especially for beginners.

How to cite pymatgen

If you use pymatgen in your research, please consider citing the following work:

Shyue Ping Ong, William Davidson Richards, Anubhav Jain, Geoffroy Hautier, Michael Kocher, Shreyas Cholia, Dan Gunter, Vincent Chevrier, Kristin A. Persson, Gerbrand Ceder. Python Materials Genomics (pymatgen): A Robust, Open-Source Python Library for Materials Analysis. Computational Materials Science, 2013, 68, 314-319. doi:10.1016/j.commatsci.2012.10.028

In addition, some of pymatgen's functionality is based on scientific advances/principles developed by the computational materials scientists in our team. Please refer to the pymatgen docs on how to cite them.

Soliciting contributions to 2nd pymatgen paper

If you are a long-standing pymatgen contributor and would like to be involved in working on an updated pymatgen publication, please fill out this co-author registration form or contact @shyuep, @mkhorton and @janosh with questions.

License

Pymatgen is released under the MIT License. The terms of the license are as follows:

The MIT License (MIT) Copyright (c) 2011-2012 MIT & LBNL

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About the Pymatgen Development Team

Shyue Ping Ong (@shyuep) of the Materials Virtual Lab started Pymatgen in 2011 and is still the project lead. Janosh Riebesell (@janosh) and Matthew Horton (@mkhorton) are co-maintainers.

The pymatgen development team is the set of all contributors to the pymatgen project, including all subprojects.

Our Copyright Policy

Pymatgen uses a shared copyright model. Each contributor maintains copyright over their contributions to pymatgen. But, it is important to note that these contributions are typically only changes to the repositories. Thus, the pymatgen source code, in its entirety is not the copyright of any single person or institution. Instead, it is the collective copyright of the entire pymatgen Development Team. If individual contributors want to maintain a record of what changes/contributions they have specific copyright on, they should indicate their copyright in the commit message of the change, when they commit the change to one of the pymatgen repositories.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymatgen-2025.1.23.tar.gz (3.1 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pymatgen-2025.1.23-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

pymatgen-2025.1.23-cp312-cp312-win32.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86

pymatgen-2025.1.23-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

pymatgen-2025.1.23-cp312-cp312-macosx_11_0_arm64.whl (3.6 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pymatgen-2025.1.23-cp312-cp312-macosx_10_9_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

pymatgen-2025.1.23-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

pymatgen-2025.1.23-cp311-cp311-win32.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86

pymatgen-2025.1.23-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pymatgen-2025.1.23-cp311-cp311-macosx_11_0_arm64.whl (3.6 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pymatgen-2025.1.23-cp311-cp311-macosx_10_9_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

pymatgen-2025.1.23-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

pymatgen-2025.1.23-cp310-cp310-win32.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86

pymatgen-2025.1.23-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pymatgen-2025.1.23-cp310-cp310-macosx_11_0_arm64.whl (3.6 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

pymatgen-2025.1.23-cp310-cp310-macosx_10_9_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

Details for the file pymatgen-2025.1.23.tar.gz.

File metadata

  • Download URL: pymatgen-2025.1.23.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.10

File hashes

Hashes for pymatgen-2025.1.23.tar.gz
Algorithm Hash digest
SHA256 4cf43678555e26d33b9180fcaeab371d71e4a6247f14351828e85a983ff18507
MD5 0bd42c5e535a4955c51743f49b39f510
BLAKE2b-256 49e5503f743cd0fc4349433697580e436c6300968bef9340c700c233ab5675f5

See more details on using hashes here.

File details

Details for the file pymatgen-2025.1.23-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.1.23-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 afb7e593de4ad9d9602c46f299ac0a5af7a70f8e8c8f265a64a04c54af6dc1e2
MD5 1608032db524edf9e888d8bd338e929c
BLAKE2b-256 628f6169fc62bc4dbd844e12156f03749be094f78126cbc39191200037655661

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.1.23-cp312-cp312-win_amd64.whl:

Publisher: release.yml on materialsproject/pymatgen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymatgen-2025.1.23-cp312-cp312-win32.whl.

File metadata

  • Download URL: pymatgen-2025.1.23-cp312-cp312-win32.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pymatgen-2025.1.23-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 77d2c0baf1097e0e9c9e916a99578e74a8da48e9e532e18a97e43d900c8882fe
MD5 4ff2453f6fd95a593f43b89e1eec268b
BLAKE2b-256 a56e94b180e9a5c27f2f8fe69d68381582e7dcfc0d90b8169ccbdc73a75e5ffe

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.1.23-cp312-cp312-win32.whl:

Publisher: release.yml on materialsproject/pymatgen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymatgen-2025.1.23-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.1.23-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4104b7b0ed47f850e1e8ebaaabfcdf4cefa07219a919979aab7d674650484bbc
MD5 c5f4985a11a3bb9d7466f98ff404577e
BLAKE2b-256 d4c87069325b0077159a1e978d74e0a782f49420c29939bc58a17e372feaaad6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.1.23-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on materialsproject/pymatgen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymatgen-2025.1.23-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.1.23-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 64f50639202051f2afe7162d2dc0d752f7d468917f3e1499d9f7c46cb97fd918
MD5 8e35703fc46ab8ee2be290db1c93f710
BLAKE2b-256 2d231a34815b8d27672679ec4764f02209fc2bf65faed69ddab61aa7a0eb89de

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.1.23-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on materialsproject/pymatgen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymatgen-2025.1.23-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.1.23-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8ae9129cb3a6d0f268366cd9b3d1950d4a02b6a93386c64cd2c6376e4a0b0efc
MD5 de390dfd335836ea2410cb029013ac28
BLAKE2b-256 1da18ca9319a070cba57ff1036ece28bf7b84f4debd0594fb28d5333f07e3d58

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.1.23-cp312-cp312-macosx_10_9_x86_64.whl:

Publisher: release.yml on materialsproject/pymatgen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymatgen-2025.1.23-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.1.23-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2905ab9a888b8cac0271279927114c5cb33ca330fc97ffd27b34c03e281d3aee
MD5 f631e53156ea4cff42840cf1f01b8f44
BLAKE2b-256 e025fe58d5e5bcaf06e81c3bd828577288de1069916de934393a49743ee40844

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.1.23-cp311-cp311-win_amd64.whl:

Publisher: release.yml on materialsproject/pymatgen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymatgen-2025.1.23-cp311-cp311-win32.whl.

File metadata

  • Download URL: pymatgen-2025.1.23-cp311-cp311-win32.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pymatgen-2025.1.23-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 ade5c0f89ec1e3411faf65b50dcc16d1f57f046da25f58976a02906b0d215f82
MD5 ada0301dba41e96b411353df945af779
BLAKE2b-256 f1399bb3904600505b7d515fd659274bd126b85e3555d3c7ed40b7f9a6cd5ab0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.1.23-cp311-cp311-win32.whl:

Publisher: release.yml on materialsproject/pymatgen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymatgen-2025.1.23-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.1.23-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 49c431c9a9db451f97660dc9a187250003c71761bf7e9d428b0d19197dc99725
MD5 12d7c9862901ea799e9480d5583f0e35
BLAKE2b-256 bd7b81defda4292856de9fd8ced326fb58c6cf4d0b645a192bccd9a78b20503d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.1.23-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on materialsproject/pymatgen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymatgen-2025.1.23-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.1.23-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 51777dbe3e06a0d420c287974633ab6857e9e4cb099f0b8197807acf4051dcd5
MD5 39849894380f0339f646e00792e8fe87
BLAKE2b-256 91fbd6917c26843d7a09fd1ef9c66cbc6d54f8277187b9fc087484f5587aa54c

See more details on using hashes here.

File details

Details for the file pymatgen-2025.1.23-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.1.23-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0c52e7b186e35fa1c4965c7fa38ccfbcbdd3bade7233d94c9ba22340e7c0eb0b
MD5 eb9e27b1bb3413abcdd2119242c053a1
BLAKE2b-256 1ceaf88e0566bf65e7c1b47c71ed4f41378417a2a12d547d55f5250c962ba714

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.1.23-cp311-cp311-macosx_10_9_x86_64.whl:

Publisher: release.yml on materialsproject/pymatgen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymatgen-2025.1.23-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.1.23-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b05f3867f49f18101ef70a21ac19bdde445cc03097aaa04f1bab2f8dc0547deb
MD5 a9b7f25ccebae7eb295ae736edba6769
BLAKE2b-256 58a39a71fefae89448c1472c12d17ebf437cbd27742cf6a375a3edcc1c6e0814

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.1.23-cp310-cp310-win_amd64.whl:

Publisher: release.yml on materialsproject/pymatgen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymatgen-2025.1.23-cp310-cp310-win32.whl.

File metadata

  • Download URL: pymatgen-2025.1.23-cp310-cp310-win32.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pymatgen-2025.1.23-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 3b9de62200a998bab6689cba7f8857d79f6d8962fd53098e84d39a01b884b29f
MD5 3745890ab5fa2e959f47127b2c4b4ce8
BLAKE2b-256 118a9a5897d3eba7d5e5e5337f51ff31e349c5205e05b8b5296fae923b36f462

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.1.23-cp310-cp310-win32.whl:

Publisher: release.yml on materialsproject/pymatgen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymatgen-2025.1.23-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.1.23-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0394c10eb9191b28cdda0e66b8c9810f09c3a0cfd4d160920bbb3b8b947565d5
MD5 9d4c4a26022c5fbc7547e4e228680048
BLAKE2b-256 c07f1b72492604e115d17f9cebf0212c63789c749bd5d4a41795fd6f92b13933

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.1.23-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on materialsproject/pymatgen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymatgen-2025.1.23-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.1.23-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0c94534a6c1a428a657d49417dda23d94c4ef784600b8124d1ae5e591766d8d1
MD5 77da618093e495335cc6f9c57b4e9e54
BLAKE2b-256 9998db9ff7da61081b5d413d678dfb8c465af8b4416ed267858b57a8571d36d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.1.23-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: release.yml on materialsproject/pymatgen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymatgen-2025.1.23-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.1.23-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5ea182aba769adf217d9cf4dd973b30ec4cfb19fe019a989405ae41b8c3d9b1f
MD5 77770b9f3c495ee65e64242c3539e804
BLAKE2b-256 89773f2edce1defb45c7288ce7904ca28b46f97907b4577c594ea228b21073dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.1.23-cp310-cp310-macosx_10_9_x86_64.whl:

Publisher: release.yml on materialsproject/pymatgen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page