What problem does it solve?
This Skill simplifies materials analysis, allowing users to create, analyze, and manipulate crystal structures, compute phase diagrams, and access Materials Project data.
Core Features & Use Cases
- Structure Creation and Manipulation: Create structures from scratch or from files, perform transformations, and analyze symmetry and coordination.
- File Format Conversion: Convert between 100+ file formats with automatic detection.
- Structure Analysis: Analyze structures for symmetry, coordination, and other properties.
- Phase Diagrams and Thermodynamics: Construct phase diagrams and analyze thermodynamic stability.
- Electronic Structure Analysis: Analyze band structures, density of states, and electronic properties.
- Surface and Interface Analysis: Generate slabs, analyze surfaces, and study interfaces.
- Materials Project Database Access: Programatically access the Materials Project database for structure and property data.
- Computational Workflow Setup: Set up calculations for various electronic structure codes.
- Advanced Analysis: Perform diffraction, elasticity, magnetism, and reaction analysis.
- Use Case: Imagine you need to analyze the crystal structure of a new material. Use this Skill to create the structure, compute its phase diagram, and analyze its electronic properties.
Quick Start
Install the skill using the following command:
uv pip install pymatgen
Then, you can create a new structure and write it to a CIF file:
from pymatgen.core import Structure
lattice = Lattice.cubic(3.84)
struct = Structure(lattice, ["Si", "Si"], [[0, 0, 0], [0.25, 0.25, 0.25]])
struct.to(filename="structure.cif")