Skip to main content

CI Status PyPI Downloads Conda Downloads Coveralls pre-commit.ci status

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, 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 own 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 extremely fast and are in fact comparable to codes written in other languages. 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.

Getting pymatgen

Before installing pymatgen, you may need to first install a few critical dependencies manually. Please refer to the official pymatgen page for installation details and requirements, including instructions for the bleeding edge developmental version. For people who are absolutely new to Python packages, it is highly recommended you do the installation using conda, which will make things a lot easier, especially on Windows:

conda install --channel conda-forge pymatgen

In line with the Scientific Python stack, in particular numpy, pymatgen support a minimum Python version of 3.8 from v2022.01.08.

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

Some extra functionality (e.g., generation of POTCARs) do require additional setup (see the pymatgen page).

Change Log

Please check GitHub releases and commit history for the latest changes. A legacy changelog is still up at https://pymatgen.org/change_log.

Using pymatgen

Please refer to the official pymatgen page for tutorials and examples.

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 pymatgen's documentation on how to cite them.

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 of the Materials Virtual Lab started Pymatgen in 2011, and is still the project lead.

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.

Metadata

Release files for pymatgen 2023.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymatgen 2023.1.9
File Size Uploaded
pymatgen-2023.1.9.tar.gz 9.6 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for pymatgen 2023.1.9
File
pymatgen-2023.1.9-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
pymatgen-2023.1.9-cp310-cp310-macosx_11_0_x86_64.whl CPython 3.10 CPython 3.10 macOS 11.0+ x86-64 Details
pymatgen-2023.1.9-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
pymatgen-2023.1.9-cp39-cp39-macosx_11_0_x86_64.whl CPython 3.9 CPython 3.9 macOS 11.0+ x86-64 Details
pymatgen-2023.1.9-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
pymatgen-2023.1.9-cp38-cp38-macosx_10_15_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.15+ x86-64 Details

Total release size: 70.7 MB

Release files / pymatgen-2023.1.9.tar.gz

Download URL pymatgen-2023.1.9.tar.gz
Size 9.6 MB
Tags Source
SHA-256 checksum
How to use checksums
93238f082521005502f4634bd0cdafbbbfb4ebadd2d0631af9c3247d0965e4fb
BLAKE2b-256 checksum
How to use checksums
778e652c09d9ae588b754cdaaba0110d5a79dafea016d2941873d0e1dc05a41d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.15

Release files / pymatgen-2023.1.9-cp310-cp310-win_amd64.whl

Download URL pymatgen-2023.1.9-cp310-cp310-win_amd64.whl
Size 10.2 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
0e508ffc96eb425dd3d4604242727483bbbb31f15a38a60eddb19f33709aed42
BLAKE2b-256 checksum
How to use checksums
ae97dd0f1646cc3a8d3ac3b9f794d339d616d20771b572ff8138586091f2f638
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release files / pymatgen-2023.1.9-cp310-cp310-macosx_11_0_x86_64.whl

Download URL pymatgen-2023.1.9-cp310-cp310-macosx_11_0_x86_64.whl
Size 10.2 MB
Tags CPython 3.10 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
157eec2e6f82b402ee33a6d7e3c8e9389691ea136dee23ba556f2d8ca35b4b04
BLAKE2b-256 checksum
How to use checksums
3328d34c77e4b1ee8a4adcf773632d2d0a7992cfbd9fbb56fb8deba3e4414941
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release files / pymatgen-2023.1.9-cp39-cp39-win_amd64.whl

Download URL pymatgen-2023.1.9-cp39-cp39-win_amd64.whl
Size 10.2 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
66f00550971cfd1de4da87e107c58939752982c502c8c276f7af7f0e82b0bbb8
BLAKE2b-256 checksum
How to use checksums
fca88831f4f35291fb39e1513e6ff4f42e6544f17f6f12fc894d27172a616c7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Release files / pymatgen-2023.1.9-cp39-cp39-macosx_11_0_x86_64.whl

Download URL pymatgen-2023.1.9-cp39-cp39-macosx_11_0_x86_64.whl
Size 10.2 MB
Tags CPython 3.9 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
36c14d61cc06b91e5bce6da6d6d42aa497ebef3eb236d0a5bb69ce98298b4e2f
BLAKE2b-256 checksum
How to use checksums
9db72d3b0eeae11fbac9227582b12c10fc97b97cfdb2288e18db6757b7d60161
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / pymatgen-2023.1.9-cp38-cp38-win_amd64.whl

Download URL pymatgen-2023.1.9-cp38-cp38-win_amd64.whl
Size 10.2 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
3e5f14529a67ba5fa53194a1776c89c124aa753fb3f7c9401b61fc79c203364e
BLAKE2b-256 checksum
How to use checksums
f532ec0e043f1857211097fa6bc8b9d8efb7b65ba094030609cdbccbb353df9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release files / pymatgen-2023.1.9-cp38-cp38-macosx_10_15_x86_64.whl

Download URL pymatgen-2023.1.9-cp38-cp38-macosx_10_15_x86_64.whl
Size 10.2 MB
Tags CPython 3.8 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
30f6ecdbca03754948a1b358bdc515d2afc1f6e6482bfb63b2414e76c19bdddc
BLAKE2b-256 checksum
How to use checksums
ac90a5eb335a7ffb1723aabd44399043fbd16112af8c4cd35a993316e2e2b195
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.15

Release history Release notifications | RSS feed

This release

2023.1.9 This release

7 release files

4.7.7

5 release files

4.7.6

5 release files

4.7.5

5 release files

4.7.4

5 release files

4.7.3

5 release files

4.7.2

5 release files

4.7.1

5 release files

4.7.0

5 release files

4.6.2

4 release files

4.6.1

5 release files

4.6.0

5 release files

4.5.7

5 release files

4.5.6

4 release files

4.5.5

4 release files

4.5.4

4 release files

4.5.3

4 release files

4.5.2

4 release files

4.5.1

4 release files

4.5.0

4 release files

4.4.11

4 release files

4.4.10

3 release files

4.4.9

4 release files

4.4.8

4 release files

4.4.7

3 release files

4.4.6

4 release files

4.4.5

4 release files

4.4.4

4 release files

4.4.3

4 release files

4.4.2

4 release files

4.4.1

4 release files

4.4.0

4 release files

4.3.2

4 release files

4.3.1

4 release files

4.3.0

4 release files

4.2.5

4 release files

4.2.4

3 release files

4.2.3

3 release files

4.2.2

2 release files

4.2.1

2 release files

4.2.0

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.7.1

2 release files

3.7.0

3 release files

3.6.1

2 release files

3.6.0

2 release files

3.5.3

2 release files

3.5.2

2 release files

3.5.1

2 release files

3.5.0

2 release files

3.4.0

2 release files

3.3.6

2 release files

3.3.5

2 release files

3.3.4

2 release files

3.3.3

2 release files

3.3.2

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.10

2 release files

3.2.9

2 release files

3.2.8

2 release files

3.2.7

2 release files

3.2.6

2 release files

3.2.5

2 release files

3.2.4

2 release files

3.2.3

2 release files

3.2.2

1 release file

3.2.1

2 release files

3.2.0

2 release files

3.1.9

2 release files

3.1.8

2 release files

3.1.7

2 release files

3.1.6

2 release files

3.1.5

2 release files

3.1.4

2 release files

3.1.3

2 release files

3.1.2

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.13

2 release files

3.0.12

3.0.11

2 release files

3.0.9

2 release files

3.0.8

2 release files

3.0.7

2 release files

3.0.6

2 release files

3.0.5

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

3 release files

3.0.1

2 release files

3.0.0

2 release files

2.10.3

2 release files

2.10.2

2 release files

2.10.1

2 release files

2.10.0

2 release files

2.9.13

2 release files

2.9.12

2 release files

2.9.9

2 release files

2.9.8

2 release files

2.9.7

2 release files

2.9.6

2 release files

2.9.5

2 release files

2.9.4

2 release files

2.9.3

2 release files

2.9.2

2 release files

2.9.1

2 release files

2.9.0

1 release file

2.8.10

2 release files

2.8.9

2 release files

2.8.8

2 release files

2.8.7

2 release files

2.8.6

2 release files

2.8.5

2 release files

2.8.3

2 release files

2.8.2

2 release files

2.8.1

2 release files

2.8.0

2 release files

2.7.9

2 release files

2.7.8

2 release files

2.7.7

2 release files

2.7.6

2 release files

2.7.5

2 release files

2.7.4

2 release files

2.7.3

2 release files

2.7.1

2 release files

2.7.0

2 release files

2.6.6

2 release files

2.6.5

2 release files

2.6.4

2 release files

2.6.3

2 release files

2.6.2

2 release files

2.6.1

2 release files

2.5.5

2 release files

2.5.4

2 release files

2.5.3

2 release files

2.5.2

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.3

2 release files

2.4.2

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.2

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.6

2 release files

2.2.4

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.2

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.9.0

2 release files

1.8.3

2 release files

1.8.2

2 release files

1.8.0

2 release files

1.7.2

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.2.9

2 release files

1.2.8

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.5

1 release file

1.0.4

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page