Questions tagged [pymatgen]

Pymatgen (Python Materials Genomics) is a robust, open-source Python library for materials analysis.

It currently powers the public Materials Project (http://www.materialsproject.org), an initiative to make calculated properties of all known inorganic materials available to materials researchers. These are some of the main features:

  • Highly flexible classes for the representation of Element, Site, Molecule, Structure objects.
  • Extensive io capabilities to manipulate many VASP (http://cms.mpi.univie.ac.at/vasp/) and ABINIT (http://www.abinit.org/) input and output files and the crystallographic information file format. This includes generating Structure objects from vasp input and output. There is also support for Gaussian input files and XYZ file for molecules.
  • Comprehensive tool to generate and view compositional and grand canonical phase diagrams.
  • Electronic structure analyses (DOS and Bandstructure).
  • Integration with the Materials Project REST API.

View details here: http://pymatgen.org/

42 questions
3
votes
0 answers

Can't install Pymatgen [Could not build wheels for pymatgen]

I'm trying to install pymatgen but it returns the following error: ERROR: Could not build wheels for pymatgen, which is required to install pyproject.toml-based projects The complete error is as follows: Using cached pymatgen-2021.2.8.1.tar.gz (3.0…
KoenH
  • 31
  • 1
2
votes
1 answer

Can't import pymatgen.core "No module named 'pymatgen.core'"

I've used pip install pymatgen with Python 3.9.1 on Windows 10 to install pymatgen, but I'm getting the following error: Traceback (most recent call last): File "D:\code\pymatgen\pymatgen.py", line 1, in import pymatgen.core…
xist
  • 21
  • 4
2
votes
1 answer

Converting a primitive structure to conventional standard with pymatgen?

How do I convert a primitive structure to the conventional standard representation with pymatgen?
2
votes
1 answer

How to get all bond angles within a structure, using pymatgen?

So, using pymatgen, I have a structure object. What I want to do is get all of the bond angles within the structure. I could loop over every atom to get all bond angles, but this would include every atom, regardless of how far apart they are, which…
njszym
  • 41
  • 7
1
vote
0 answers

How to extract conventional standard type CIF files from Materials Project through pymatgen or matminer

I use Matminer to get CIF file from Materials Project.The code is: from matminer.data_retrieval.retrieve_MP import MPDataRetrieval mpdr = MPDataRetrieval(api_key='My_key') df = mpdr.get_dataframe(criteria='Mg2SiO4', properties=['cif']) The CIF…
李子源
  • 31
  • 3
1
vote
1 answer

Pymatgen Installation issue with Anaconda python 3.8 ? Monty module not found?

I am eager to get started with Materials Simulation. I am facing issues trying to install Pymatgen with Anaconda. Here are the things I did. I am using Win 8.1 x64, Python 3.8. First I tried to install Pymatgen v2022.0.8 using 'conda install -c…
1
vote
2 answers

Google Colab shows error while installing pymatgen

I'm trying to install pymatgen in Google colab via the following command: !pip install pymatgen This throws the following error: Collecting pymatgen Using cached…
1
vote
0 answers

Download data with topological classification

In the materials project database, In the electronic structure part of compounds, there is a tag for “Topological Classification”. I am wondering if this data can be added to the properties of the query? properties = ["pretty_formula", "cif",…
hemanta
  • 1,405
  • 2
  • 13
  • 23
1
vote
1 answer

which() command can find executable only with ./

I'm using pymatgen, which has a class BaderAnalysis (https://github.com/materialsproject/pymatgen/blob/v2020.4.29/pymatgen/command_line/bader_caller.py). This class needs a executable called bader (binary from another source), so it checks if the…
ramobal
  • 241
  • 2
  • 9
1
vote
3 answers

How to install pymatgen for Python 2.7.x and not 3.6

The pymatgen module is supposed to work for Python 2.7.x or 3. Files for both are available (https://anaconda.org/matsci/pymatgen/files). My Python (sys.version) is 2.7.11. I tried installing with standard: "conda install -c mastic pymatgen", but…
David
  • 11
  • 4
1
vote
1 answer

pymatgen plotting DOS

I am trying to plot DOS (density of states) with pymatgen but I can't make it work. First time encountering self and class functions in python so I am at a loss. This link explains the package that has the function I need (I need to use…
M.O.
  • 476
  • 7
  • 19
0
votes
0 answers

How do I get pymatgen to work on a linux remote server?

I am receiving following error message when trying to run a python program using pymatgen on a linux remote server: ImportError: /home/user/.local/lib/python3.6/site-packages/pymatgen/util/coord_cython.cpython-36m-x86_64-linux-gnu.so: undefined…
Lau
  • 1
0
votes
0 answers

ImportError when using abicheck.py with abipy and pymatgen

Hi Stack Overflow community, I'm encountering an issue when trying to use abicheck.py with the abipy and pymatgen libraries in my abienv conda environment. Here's the command I'm running and the error I'm facing: Command: (abienv)…
0
votes
0 answers

Extraction of a feature for all atoms within a 1×1×1 computational cell at the center of a 3×3×3 supercell

Context: To account for periodic boundary conditions, feature extraction is performed for all atoms within a 1×1×1 computational cell at the centre of a 3×3×3 supercell. Actually, I want to extract Anion framework coordination (.py file attached…
0
votes
0 answers

Problem when using AdsorbateSiteFinder/find_adsorption_sites with Pymatgen

I'm trying to find the adsorption binding sites of a lattice provided by a quantum espresso input file which has the following cell vectors: kbasis=([[-5.14439960600149, 4.455181658787211, 0.0], [-3.858299704501117, -6.682772488180817, 0.0], [0.0,…
1
2 3