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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.11 Windows x86-64

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

Uploaded CPython 3.11 Windows x86

pymatgen-2024.4.12-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.12-cp311-cp311-macosx_11_0_arm64.whl (7.8 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

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

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.10 Windows x86

pymatgen-2024.4.12-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.12-cp310-cp310-macosx_11_0_arm64.whl (7.8 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

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

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9 Windows x86

pymatgen-2024.4.12-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.12-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.12.tar.gz.

File metadata

  • Download URL: pymatgen-2024.4.12.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.12.tar.gz
Algorithm Hash digest
SHA256 ef6c5311b17fd8cc4710c6483483da9a467375dbd54c11be90024e6a0cdd27a3
MD5 f09a63257c6dff5ff6ecc13f51a0bd0f
BLAKE2b-256 f50c849c050e113bc421573dc8608be73d48298a3ff74d13252555de4cfe1688

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2024.4.12-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 4ec97365175d18522d2853eb25f4693fdb816c932778541f054c2e31995d14b0
MD5 28744b5aea87c16c47ef73e2a21e0e22
BLAKE2b-256 f995e0db4311be2168be588517f9065396cf7026535f387f57a487f53b3def2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2024.4.12-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 c41292d308dd113dea89fff7321e3aa04058c08de0cad674275cdc914bcd0156
MD5 52090f1ea081a80828ecfc001a301923
BLAKE2b-256 037120d2ca0273c0e0e246f917512713fdaed2805cda62b074e2f0e5e0db41fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2024.4.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 99db92127254eb522e5936c9e71a2eef8e4ccd12c6bdf8ac849cac9fe4dbf0fb
MD5 b8f6434a7b1e4494c4df9edb84ece181
BLAKE2b-256 7788ada61af4ecc8e48baeac19852590c6e78f04cff3c66bcd40ae8fc1d39bc3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2024.4.12-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 737358c34319bd8126648093840c0538c3e9f9209d69ba49ae68cf736036a3e4
MD5 9fc82b189cc1adfde8a7e5e8d86af616
BLAKE2b-256 8cbb3f09b9d224bffc9ebfc0694649811810b4ea34622933cb1885296bda30e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2024.4.12-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0069bc04f74edac420568c6d909253553c4636852f9cf93ba019382a6984e00e
MD5 ba9c5529eb4cf68df55ce5b712a7a9e9
BLAKE2b-256 ccf264a74cb7d7c5fa22f3bad552ed6fc75c0ebaab11cf61c4c0ced567d3562e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2024.4.12-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 8aeccc1e4be3e6086ad38a0bf83023abb732e2d622e41fdcbf0abe571cddc7dd
MD5 66bd908a553839497bb58c5645bd7b05
BLAKE2b-256 093f3d79d6d24ff5f8ef79e8358d734888b0531ad2c41351cba73543b6c4beb4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2024.4.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 068bdaad21673638b436c0ad35f1f786157f3f8e7893974a843d17ea332d0f90
MD5 1d7f049896fb23e7790afc8330cd88af
BLAKE2b-256 45dd65913cf08765f943a361a4929e4bf599e8d8551f968f3b4073b3dd0e7a7b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2024.4.12-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 75e04c1ea1c82bd6fec8a32e5b5c0ffbbc0752ef4c3d51149a29cb4aa87b5bba
MD5 e859ea24fe7d933f354265ff5f602aac
BLAKE2b-256 0ccae04398aada5f6ea651344e11f96719701e2a3bcdb9aada60ea03a871d935

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2024.4.12-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 aab3537b7baf12c2f4a37a4405be8bfd9a6366ad6f726d6f8b6d7cbc006635dd
MD5 ec3c5f9ca4071b10b2a5d1204cc62058
BLAKE2b-256 8ece8fba6acba71fc407c94b99e6b2e0e1bb65888a2a552447230ede65f5aa4c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymatgen-2024.4.12-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.12-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 262a2255bd1b29fa48abfb3141d91280352cd0181ce05afb07388ea0b9cdefcc
MD5 dd9b052bf93b0a2f963ac8e38bfa1f13
BLAKE2b-256 b51499b64f7b6c872d6dd132df9f5b4a2f6d7a54bb7c50b252523067963ce760

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2024.4.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0606756ecd26f53f69e74264a5626315282109a7b77485bc2c29ccd94a951807
MD5 2b7462d5b998c55014b36af9d30881d1
BLAKE2b-256 c7ad33c72359c754bc0bf2d9d5b38eb9bea7b5b60e8bef5d7aa2915b71cec54c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymatgen-2024.4.12-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ca499c8dbe86dfb7247b3cc14c2b09e8790bdd0b9e53fe976311db8b43bd3c8b
MD5 99a79a8a8f94ad1ec58d3a6b5008ccaa
BLAKE2b-256 df1afa125f463437fabf31ae48a76a1af1cd379cb75791cb130dbed38d6fa42f

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