Header Ads Widget

Ab initio Calculations Using Vasp Code

Last Posts

10/recent/ticker-posts

How to download and install the Pymatgen library

 pymatgen

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 (http://cms.mpi.univie.ac.at/vasp/), ABINIT (http://www.abinit.org/), 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, Crystallography Open Database and other external data sources.

Reference: https://pymatgen.org/

 

To install the library we need to install the anaconda which includes conda package manager, python3.9 version and Jupyter Notebook used for scientific computing and data science.

 

To  install Conda click on the following link

How to install the package manager Conda

 

First we need to create a virtual environment with conda as follows:

algerien1970@linux-kq57:~/abinitio/...> conda create -n pytmatgen -c conda-forge python=3.9   

 

Change to this environment

algerien1970@linux-kq57:~/abinitio/.......> conda activate pytmatgen
(pytmatgen) algerien1970@linux-kq57:~/abinitio/......> 

 

Note that you might need to ensure a relatively recent version of gcc is available to compile pymatgen. You can use conda to get that:

conda install gcc

To install the library we run the following command

pip install pymatgen

 

Pymatgen is under active development, and new features are added regularly. To upgrade pymatgen to the latest version, use the following command:

conda upgrade pymatgen


We got the following message

Successfully built pymatgen
Installing collected packages: tenacity, ruamel.yaml.clib, latexcodec, uncertainties, tabulate, spglib, ruamel.yaml, pybtex, plotly, palettable, monty, pymatgen
Successfully installed latexcodec-2.0.1 monty-2022.1.19 palettable-3.3.0 plotly-5.6.0 pybtex-0.24.0 pymatgen-2022.2.10 ruamel.yaml-0.17.21 ruamel.yaml.clib-0.2.6 spglib-1.16.3 tabulate-0.8.9 tenacity-8.0.1 uncertainties-3.1.6



Post a Comment

0 Comments