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.24.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.1.24-cp312-cp312-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12Windows x86

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.9+ x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11Windows x86

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.9+ x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10Windows x86

pymatgen-2025.1.24-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.1.24-cp310-cp310-macosx_11_0_arm64.whl (3.7 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

pymatgen-2025.1.24-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.24.tar.gz.

File metadata

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

File hashes

Hashes for pymatgen-2025.1.24.tar.gz
Algorithm Hash digest
SHA256 1b3d246ee33f521526d6f6f0da09654da7873d278c57a2fcc495e2f3f40b1ed7
MD5 f748ca39851efa7d7698031895d1532a
BLAKE2b-256 c12cd84b6bc425fcc77fbfb9c280b467969faa1924324204e79fbf6de4146427

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2025.1.24-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1b3b07c51cabd4dd0a575ae8f7f5f59c69cbc2042e5eb8d0a2fae564efe373db
MD5 9f856ec5e8a6669b749313be7314d638
BLAKE2b-256 ac070cb7eb8cdeccc1b3530e9dfeb0a653d23e725d88eb12916ff4e532b81b4e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pymatgen-2025.1.24-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.1.24-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 8e6ca1d212e1c005f555806ecf5568ffe853f3baf0597719c06ed6a15a1c58d7
MD5 0817e81afd389c5c3d80b37d7cc43c86
BLAKE2b-256 e1eb7472a26a08b5d0d1fdab3f4dfebdf3e282514cb9087fd302ce503ffb7b56

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pymatgen-2025.1.24-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d378e6013411115f5ca5001ff6694137dc16171271131afd7048ddd31369138a
MD5 ce42d2bb589da94c6a6bb6f7db905f70
BLAKE2b-256 df0abad4d6266cfb3851091aa6a682704d8b16285a928aec379e92f66fb17c73

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pymatgen-2025.1.24-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9a9b5f363771ad0ddcea5e9918de1c8f0c0de50ff5413ef7f257d0ae37e17347
MD5 4ce75822be9ba27828968ab2666efa85
BLAKE2b-256 a57bca3f915bf7abd3346348cfbdbaeaa5e70423ce08eb33f9794e12ffeaf3fc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pymatgen-2025.1.24-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f565f05c71e4c7b0481791592874bd247fca51aaa77fc827223c8e8413fb4bfe
MD5 a9745f3e408db33dc72a63408a6ce050
BLAKE2b-256 8620a185868bc0c63aa19fd3f4f333c46f3ba81d9bfb7f2b14e76e856fa380b3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pymatgen-2025.1.24-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5932fc8690cb133105272104000dce293d2b161bc05e4a94dd1aaff1d998e62e
MD5 1cbad0e25f75e317fae3f52867fab0f1
BLAKE2b-256 5e33d83a73304ba451435046eb788f5194edf2431b16d7e3adbbd77ca067dede

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pymatgen-2025.1.24-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.1.24-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 aa180d66df213fc6cf17cacf33db6fa3cd755decbcc81acd26913bd599b8ca03
MD5 e34db97f8478fd6899c1e1fc77b0ada8
BLAKE2b-256 c30a443d8a0fc55661d0db41cc0239c1b7e76eb9dff732a235fa7ace6c6b7a17

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pymatgen-2025.1.24-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bd61a482acea459e37e6b317573a685ed205f6e24f8e0c3df3914f0e5413da13
MD5 e09f42dd473173299d5fa227c9a63842
BLAKE2b-256 2400dfc19642d32f454bbc7b5444485eafbc1d533679485a1b40717faa019641

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pymatgen-2025.1.24-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c3283cf0819f4024aba19934ef71512e150f83079085c998fe67841d8d54d33f
MD5 ba278e21e19fca3341ba795be20caa37
BLAKE2b-256 6aee68ba8e5ad2f7c8cd16e39c3027453290055c347e3dba208a867dece86777

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2025.1.24-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 85256dcce38c7fe69ffd6a6cf83516a805a1f13a8b46270fabadae3e3d281ec1
MD5 f2d33a2074b43d6d6d972baf10c76858
BLAKE2b-256 9aefe8fb3b3d0a4f240641a853e0306047a8e11adc845cc23a47e8a46d64edec

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pymatgen-2025.1.24-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b6fb401e918cad1d413a6b4492a8a4b05610aec02b32d67647f327087145de75
MD5 af7f1ea46c51c9e5a2ba5739f65c0327
BLAKE2b-256 a8cbe0e76229e1cc76e10ce701880d8e4bd59428012838bfaa2568589a746ff8

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pymatgen-2025.1.24-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.1.24-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 83f9c1e6660ecd0c528996fdddf5a0d19d9a0d18686b5a6f3850048b03d3d313
MD5 801e1e4370f1ae91df7257cc6c11ed46
BLAKE2b-256 86d0c9b2ab2ec1ffd0c4d7981e78cfe80afed1f8e177f17d4428250b3d78f57c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pymatgen-2025.1.24-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 825068c92967987ea2f19dc8db13b2140144dbfba0e31305413adf4b89ee0f26
MD5 9bc98fcd3ac297f38c9421ae9908524c
BLAKE2b-256 9378f8e62a354ace0a334c684f8f2c9fc4360256d5ec449e2d63ef979bb5c981

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pymatgen-2025.1.24-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 469249051cfce2ddcb5e1f63f8cd2298b30955e9a8083c876934d75e6c536f13
MD5 b2f6524145d037277b984c57dfd28b65
BLAKE2b-256 9828c6573f8feddbbb3e279c4ea8c08c355dd968b31c5b88afcf95be35804a07

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pymatgen-2025.1.24-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 893780cf4dc25b2561c82d9ff510849c228b740d184b861e804fd031e1ccbbd7
MD5 525fd1132322e8eb1091a7579a50dffb
BLAKE2b-256 aaf2694e0cc5a432d509934542f193c973ae5b747e8d69ca36fb9238363ec2c5

See more details on using hashes here.

Provenance

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