Skip to main content

Python Materials Genomics is a robust materials analysis code that defines core object representations for structures and molecules with support for many electronic structure codes. It is currently the core analysis code powering the Materials Project (https://materialsproject.org).

Project description

Logo

CI Status codecov PyPI Downloads Conda Downloads Requires Python 3.9+ 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.9. 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.

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-2024.4.13.tar.gz (7.2 MB view details)

Uploaded Source

Built Distributions

pymatgen-2024.4.13-cp311-cp311-win_amd64.whl (7.7 MB view details)

Uploaded CPython 3.11 Windows x86-64

pymatgen-2024.4.13-cp311-cp311-win32.whl (7.7 MB view details)

Uploaded CPython 3.11 Windows x86

pymatgen-2024.4.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.2 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pymatgen-2024.4.13-cp311-cp311-macosx_11_0_arm64.whl (7.8 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

pymatgen-2024.4.13-cp310-cp310-win_amd64.whl (7.7 MB view details)

Uploaded CPython 3.10 Windows x86-64

pymatgen-2024.4.13-cp310-cp310-win32.whl (7.7 MB view details)

Uploaded CPython 3.10 Windows x86

pymatgen-2024.4.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.0 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pymatgen-2024.4.13-cp310-cp310-macosx_11_0_arm64.whl (7.8 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

pymatgen-2024.4.13-cp39-cp39-win_amd64.whl (7.7 MB view details)

Uploaded CPython 3.9 Windows x86-64

pymatgen-2024.4.13-cp39-cp39-win32.whl (7.7 MB view details)

Uploaded CPython 3.9 Windows x86

pymatgen-2024.4.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.1 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pymatgen-2024.4.13-cp39-cp39-macosx_11_0_arm64.whl (7.8 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: pymatgen-2024.4.13.tar.gz
  • Upload date:
  • Size: 7.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for pymatgen-2024.4.13.tar.gz
Algorithm Hash digest
SHA256 98b32455121fc6d80f29b49e945448ab709c5520b88a76b90eb707155c6cec02
MD5 8435dba672fb84096c145b69ecced090
BLAKE2b-256 cf1fb74ea631d5c114038a36088534102e77ab5a8586818d7723d56776f30b20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2024.4.13-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 49e72b9d10149ede47cfe3e5f0d696ee510489a420f65e1107cd41c0e5e4152a
MD5 93b9787d9748aac10f4b5e1080a85b8e
BLAKE2b-256 4b00ba4a19d4cb3ee2d794c857fbc7e02b62ff0c1294bd4ff157c246ca4aaf21

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2024.4.13-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 eb089c5484565b203830476c44642a786b7eb2eabf931639a7cbbb8497bfe420
MD5 5b3142b924f502a8118fcae641a1af3d
BLAKE2b-256 ec9035ddfa23803e1a063131e2277f33d31ff35f78990df3b8e8af219e140075

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2024.4.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 06eab7470c66c242c1a77d0566f890fbf309a96e3438609606b5236804a9141d
MD5 dd2265a0f3e9f7314822bb1aaa7ff866
BLAKE2b-256 803df01ac3786d613b34b2e2ae90ab3bce8db2d72dd702ca88925a8636006dfb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2024.4.13-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f2c5e713cc697b14c06f2501143c881ace8f84cf5d7cff3d85a38556ca85b62
MD5 4c4b82b8f0f8979c29bd68612cf6acbd
BLAKE2b-256 d4389a4f2c2bfd0c8d70093e92c6dcc3d8c99103253d22f22045dd2fc3097ec2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2024.4.13-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d48e593633b26a6fede6c57c736acbb63f62d3aa35ff19e71b9584ff1398dc06
MD5 8b6bc3c2fc7d2e7f1b1dd559ee392a3c
BLAKE2b-256 ed7eb02a5bc6c039c5c6a6132bc24f6c4a6e591dcfc3ee657ce5dae8b13b41e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2024.4.13-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 341fb7edfe50dcea1ca6d6990011475fee28e5b792db6ddad5829802e6dc864f
MD5 6bb058f2e4a1465262940f9472e18c99
BLAKE2b-256 6b089a5e7d72e2227f7ebbe7f8b41889c6b64b81062722b0fbd1dba967375b98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2024.4.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 311fafe9660f848f57eca05a570f3083c369c2e53cc3423d0a5e30fbb8413783
MD5 2eb12fba031e0ad781119fe5c2261f2d
BLAKE2b-256 24f8c9fa8af7ef8d6c4e9c5f1a8fbbb0b5df410af29263181bc4c82623ee5f69

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2024.4.13-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0197d8dc69386d69ed09e35b40ed66795db91837603953488d473bc2bfc159f9
MD5 626fb9ccd9df548387412d5e20a4bd22
BLAKE2b-256 a47a69c17fd3e364b6beb5b37a7da2dca2105f609bf83bd80fea5895b609a5b2

See more details on using hashes here.

File details

Details for the file pymatgen-2024.4.13-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for pymatgen-2024.4.13-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cf6db323a836ffa7e9efffeff45a132c44bd1f4afc070c984ba92cb0b88ba373
MD5 adc92a4b9541d8d8f544494312d5704c
BLAKE2b-256 7297a9d11b9f654b95c61d9a9d0d84700b3747523e2a303ad66fdbf036f2e6a7

See more details on using hashes here.

File details

Details for the file pymatgen-2024.4.13-cp39-cp39-win32.whl.

File metadata

  • Download URL: pymatgen-2024.4.13-cp39-cp39-win32.whl
  • Upload date:
  • Size: 7.7 MB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for pymatgen-2024.4.13-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 25329e474070ab467a6d8a0e21fb1bf11ace973e230cbfdef06fc120a3776cae
MD5 a3dd9c36c5b7fd02b9ed251625c79c13
BLAKE2b-256 4ce2c5565850c9c3d364a0402c7c7094daa03f7a48875e750606b279d85e2735

See more details on using hashes here.

File details

Details for the file pymatgen-2024.4.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pymatgen-2024.4.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0f5daaeea45bb29fb459483028d346ac3ae4ff63fe7eab82e7df0af1998585c2
MD5 c592c8877f9388cc0133f3b0f7db9e27
BLAKE2b-256 f990aabbcd370fecc98fbade894ddc967de6f9f585509451f6153c0123c4d606

See more details on using hashes here.

File details

Details for the file pymatgen-2024.4.13-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pymatgen-2024.4.13-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dec37dd6a2a3a4de419d1b371289fd9a50b9a034a256138ab911d192f5a0db79
MD5 8512961bd6a6a25b22b63ee24329c5bf
BLAKE2b-256 45bd177355f323d03ee70c85a0fdd35ac94dcad0d0d311b1a9ce233b6d3ea507

See more details on using hashes here.

Supported by

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