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
0
votes
1 answer

command line utility of pymatgen

I have installed the python package pymatgen and it perfectly works when I use it in my Jupyter notebooks. However, now I wanted to do the POSCAR setup as specified here: https://pymatgen.org/installation.html But when I run: pmg config -p…
ramobal
  • 241
  • 2
  • 9
0
votes
1 answer

Cleave specific termination with SlabGenerator in Pymatgen

I'm trying to use pymatgen model to cleave a specific termination on Fe2O3 and Al2O3. In SlabGenerator, one of its parameter is in_unit_planes(bool), default =false. It said in the instruction that I can set either in Angstrong or in a unit of hkl…
0
votes
1 answer

Pymatgen: How to convert query result to structure

We have existing code to get some material properties for many materials (>60,000). from pymatgen import MPRester mpr = MPRester(api_key="") criteria={"nelements":{'$lt':4}} properties=["pretty_formula","cif","material_id",…
Sandro
  • 286
  • 1
  • 13
0
votes
2 answers

Extracting the coordinates and atom types from a pymatgen structure object

What is the syntax for extracting the atomic coordinates list, [[x1, y1, z1], [x2, y2, z2], ...] and atomic species list, eg. [1,1,1,1,...] from a pymatgen structure object?
0
votes
1 answer

What Does the coordinate list next to the cartesian coordinates of an atom represent in neighbor_list

I was trying to analyze the result obtained by using pymatgen.analysis.local_env module by using min_dist approach by using following script: from pymatgen.analysis.local_env import structure_from_cif =…
hemanta
  • 1,405
  • 2
  • 13
  • 23
0
votes
1 answer

add atoms randomly around an atom in vasp poscar using pymatgen

I am trying to find all atoms of type A in a VASP POSCAR and then randomly add "n" atoms of type B in a sphere of radius ("r") centered at each site of type A atom using pymatgen and return each time a new POSCAR.
apollo86
  • 7
  • 4
0
votes
1 answer

Pymatgen XRD Plot

I am following the XRD plot tutorial and as it told in this tutorial I imported from pymatgen import Lattice, Structure from pymatgen.analysis.diffraction.xrd import XRDCalculator from IPython.display import Image, display %matplotlib inline And…
Z.Grey
  • 164
  • 2
  • 12
0
votes
1 answer

Pymatgen- Installing modules [pymatgen.apps.borg.queen]

it is a very basic question but I stuck it. I have installed pymatgen and following this phase diagram tutorial. WHen I try to import pymatgen.borg it gives me an error I guess I need to install pymatgen.borg so to install pymatgen.borg.queen…
Z.Grey
  • 164
  • 2
  • 12
0
votes
1 answer

Magnetic moments relative to crystal axes?

I am using pymatgen to write .mcif files. My structures always have collinear magnetic moments of magnitude 4 along z, but before writing them to the file I noticed that pymatgen transforms them with the function…
Michele
  • 1
  • 1
0
votes
1 answer

Simple phase diagram using pymatgen

I've been getting familiar with the pymatgen package and need to make phase diagrams. There's a quick tutorial on this web page that goes through how to make a ternary diagram, but I actually want to make a much simpler one of a pure substance. I…
Astrum
  • 591
  • 3
  • 12
  • 25
-1
votes
1 answer

Getting all combinations of a string with subscript and specif format

I have seen various combination formats. But I have to try something new. Lets say, we have three lists: A = ('Li', 'B', 'C', 'N') B = ('Li', 'B', 'C', 'N') X = ('O', 'Br', 'Cl') All the element of A are same as B. Now I need to create all…
-2
votes
1 answer

How to writing files using Python For-loop

I am new to SO and self-learning Python. I am using Pymatgen to study computational material science and I have a question which I have been struggling with and couldn't find an answer anywhere. I have a list - output from the script like the…
1 2
3