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.2.18.tar.gz (3.2 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.2.18-cp312-cp312-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.12Windows x86-64

pymatgen-2025.2.18-cp312-cp312-win32.whl (3.7 MB view details)

Uploaded CPython 3.12Windows x86

pymatgen-2025.2.18-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.2.18-cp312-cp312-macosx_11_0_arm64.whl (3.7 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.9+ x86-64

pymatgen-2025.2.18-cp311-cp311-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.11Windows x86-64

pymatgen-2025.2.18-cp311-cp311-win32.whl (3.7 MB view details)

Uploaded CPython 3.11Windows x86

pymatgen-2025.2.18-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.2.18-cp311-cp311-macosx_11_0_arm64.whl (3.7 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.9+ x86-64

pymatgen-2025.2.18-cp310-cp310-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.10Windows x86-64

pymatgen-2025.2.18-cp310-cp310-win32.whl (3.7 MB view details)

Uploaded CPython 3.10Windows x86

pymatgen-2025.2.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pymatgen-2025.2.18-cp310-cp310-macosx_11_0_arm64.whl (3.7 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

pymatgen-2025.2.18-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.2.18.tar.gz.

File metadata

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

File hashes

Hashes for pymatgen-2025.2.18.tar.gz
Algorithm Hash digest
SHA256 1f302aced2dd11d0dc8915a4bdd60914fdfffa573eb869c03a032cf25e293b30
MD5 398952148e248d2448a39cc89a5c2785
BLAKE2b-256 32a1cf550b4392bfcc222ebd89c66593570e71e9fae78fa1d1792986cb6e40cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2025.2.18-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e18c3f47b143845e1bf5ed759105cfc77d9b97dd503fb8b5893abad61fae00d9
MD5 79763b3c0e1287c218a3d913064118e8
BLAKE2b-256 658b76c5de04553293832fb075d9d817963f233d5263f25b02bb6ebadbd10379

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.2.18-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.2.18-cp312-cp312-win32.whl.

File metadata

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

File hashes

Hashes for pymatgen-2025.2.18-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 e9ab0b82af7f4d20a8f8aea2963a8a81ae2dd8018f130bef5d17d0e17ae1b8a4
MD5 6ca523a833c585048afb7e0a46adb036
BLAKE2b-256 2266ce2c553d7c0e98576c9bbaf46da5f619bbdc63e3455c4a24ac71d20e5b68

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.2.18-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.2.18-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.2.18-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 02abd9d0c417e55da3aca5de168703e6537f2ee2669bcece9180edafd60f0b40
MD5 374df947703745cdd3ed55c6cd0396dd
BLAKE2b-256 05823e9282b3821fd3cbeefcc74b59ac9c4474da796c8b1ec2f0975d263f9aae

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.2.18-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.2.18-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.2.18-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 341e00b0428733b8771d771a37587f3efff54310a570339061670eb10dfe4fa1
MD5 027c18064e504e24077bf779630680a1
BLAKE2b-256 6132afd3e52d1b35af06f774813c5b937decb76775c002b53b44d61963758beb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.2.18-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.2.18-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.2.18-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 42d9e6108fd5d25c0d0a1cf59f514276bb2df33e6d26180dff0ad04b6687e2c1
MD5 25115cfb7afdc10c8314f4efade127bc
BLAKE2b-256 637c4baba7fc3efdb6928248746cfc5025924bdde38a13900de7978b2eb9d525

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.2.18-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.2.18-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.2.18-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 26d974f4559aa41a57192987bfa91f549a517e73368dcb376deb58e486b93de4
MD5 cc310b4a3147bf262f40a7b8346f98ce
BLAKE2b-256 5410e5ce61c388383056ff6a139002e8c3d17c70c60aad5c43d41d8b46f44082

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.2.18-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.2.18-cp311-cp311-win32.whl.

File metadata

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

File hashes

Hashes for pymatgen-2025.2.18-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 f0faa7f2ad673c26d3dbfa9fc4500d2d0a2a7c730902ad0fcd6747219ebed14a
MD5 6cc2ff7eebedd8b6d117ba637ab1e634
BLAKE2b-256 8dc7a6811655f5fc563827726f68931ce4ab78cdf6c21557e6cfab66a25ebb1b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.2.18-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.2.18-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.2.18-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 37b8ee0a30503754edb47d334401652b8d08f920bacb66e4ab1015662351cbba
MD5 0550a004befcfc7d7e7fe650ecb7364e
BLAKE2b-256 231712e27bbca53ae7d1aecfc32dc384bd9420a1e8980afc40965a245ed6f0cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.2.18-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.2.18-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.2.18-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d3b036bddee9552b0a428e4b31dad291f020ff1146e6303a80d814ef5bbb3c2e
MD5 adbb1612b21359e7aa0d4c4fd1fe7c16
BLAKE2b-256 0d83bb460d28d04ffd714f59d7010ee68841180ed01bb9c2a034d620e1f7856b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2025.2.18-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 486cfed1424abd628d6da71a0c319e8716ca24042953ec4cd148acbb2b827ea5
MD5 37c399485966bca3191865ebc228a6c4
BLAKE2b-256 112cf8f5408fb7bf04df0bf1b78bbead1d36647f06a6d200c2af87a03c56f6da

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.2.18-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.2.18-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.2.18-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 35dcf38a5343fec3044f3ef3f6783a7d7dae27cc4cee01b32d13fbc6e052e793
MD5 f920776044abb5ae07b8acb95c13a393
BLAKE2b-256 2f6901f80eda16d910236ebebbb88b5670d581c3837e71a7f0b5880f59d117e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.2.18-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.2.18-cp310-cp310-win32.whl.

File metadata

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

File hashes

Hashes for pymatgen-2025.2.18-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 29e1c236dba21c42843399381ed099d2b284e8037534b5cf96f5c6abb944f100
MD5 a286bc721551587a77ec08fa2afbf2fc
BLAKE2b-256 2e641bb78d2a4131a4fbc79118416c7c0a83c60eddf5dc4b58555b0c91d11efd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.2.18-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.2.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.2.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0c078ab8e8f7bda342d4cdb0f6700428bbb4e0d9b4dc0fb7b174c466fe58b2b9
MD5 78e038d7fed88629d6d961123a7ebd23
BLAKE2b-256 80f4e61dcb5fed1aca432d75d922d05354d73076c56a54b8bfe4650388078549

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.2.18-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.2.18-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.2.18-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d9c515a4a605ede19d680870135a551a25518b97fca6359766cdcb56e41ebe77
MD5 41d60329e28a2fdbde85eef40ba33aaf
BLAKE2b-256 cbf51f35365560b061452958413f5da0088a24002d427ed42beaee84535cc5f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.2.18-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.2.18-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pymatgen-2025.2.18-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 434caf26f7a7f8956a6a731d645721bb756f3c26482de9335b063b516090c8f0
MD5 71db08473b80ff47dede24d82e4b01df
BLAKE2b-256 5b8ee9fb889fc7183bd05de5b311ed82da864996e9ad9635fceaef783dc94a99

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymatgen-2025.2.18-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