pymatgen-structure

Processes CIF, POSCAR, XYZ structures with pymatgen for supercells, substitutions, symmetry analysis, and summaries.

124|25|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/jinzhezenggroup/computational-chemistry-agent-skills --skill pymatgen-structure
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymatgen-structure
Source: https://github.com/jinzhezenggroup/computational-chemistry-agent-skills/tree/main/data-processing/pymatgen-structure
Command: npx skills add https://github.com/jinzhezenggroup/computational-chemistry-agent-skills --skill pymatgen-structure

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Structure manipulation and crystal analysis workflows based on pymatgen. USE WHEN you need to read/write common atomistic formats (CIF, POSCAR, XYZ), build supercells, perform site substitution/doping, inspect symmetry (space group), or compute local structure descriptors for materials tasks.

Core Features & Use Cases

  • Read/write common structure formats: CIF, POSCAR, XYZ.
  • Build supercells and apply symmetry-aware edits.
  • Perform substitution/doping at selected sites with explicit control.
  • Analyze symmetry, space group, and composition; generate summaries.
  • Output processed structures and lightweight analysis reports ready for downstream tasks.

Quick Start

Provide an input structure file and select an operation to preprocess or analyze the structure using pymatgen.

Frequently Asked Questions about pymatgen-structure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a CIF file to POSCAR format for crystal structure analysis?

To convert a CIF file to POSCAR format, you can read the input CIF structure and write it out as a POSCAR file. This format conversion supports CIF, POSCAR, and XYZ files for downstream materials analysis tasks.

Can I build a supercell from an existing POSCAR file using pymatgen?

Yes, you can build a supercell from a POSCAR file. By applying pymatgen to your input structure path, you can generate supercells and output the processed structure to your specified destination for further simulation.

How do I perform site substitution or doping in a crystal structure?

Site substitution or doping in a crystal structure is performed by selecting specific sites and applying symmetry-aware edits. You must provide the input structure path, operation type, and output destination to generate the substituted structure.

What is the best way to analyze the space group and symmetry of a crystal structure?

Analyzing the space group and symmetry of a crystal structure involves reading the input file and computing its symmetry properties. This process generates a lightweight analysis report detailing the space group and composition.

Do I need Python 3.10 to read and write XYZ structure files?

Yes, you need Python 3.10 or higher along with pymatgen installed to read and write XYZ structure files. Explicit input structure paths and output destinations are also required to execute these preprocessing operations.