Pymatgen Module
Pymatgen is a short form for Python Materials Genomics. It is a robust, open-source, and widely used Python library for material analysis.
Note- Only getting electronic configuration, atomic number, or any other very basic material properties does not account for material analysis.
Pymatgen is widely preferred as it is:
- Highly flexible classes for representation of Element, Site, Molecule, Structure objects, Nearest Neighbors.
- Variety of input/output formats like CIF, Gaussian, XYZ, VASP.
- Electronic structure analyses, such as the density of states and band structure.
- Powerful analysis tools.
- Integration with Materials Project REST API, Crystallography Open Database, and other external data sources.
- It is free to use, well documented, open and fast.
Installation
As it is not an inbuilt python library so need to install it externally.
First Method:
The most straightforward installation is using conda. After installing conda:
conda install –channel conda-forge pymatgen
Pymatgen uses ‘gcc’ for compilation so the latest version of the same is required to compile pymatgen.
conda install gcc
Pymatgen is open source so new features are added regularly. So to upgrade pymatgen to the latest version:
conda upgrade pymatgen
Second Method:
Using pip:
pip install pymatgen
and to upgrade pymatgen
pip install –upgrade pymatgen
Third Method:
To install pymatgen on google collab
!pip install pymatgen
Material Analysis using Python
Using basic principles of more than one field to solve a complicated problem might be very difficult to reach by using one area of knowledge. With this kind of approach, one can also redefine problems outside usual boundaries and reach solutions using a new understanding of impenetrable situations which early considered impossible to get.