LQF_Machine_Learning_E…
LQF Machine Learning Expert Guide - Routed skill for ML/Statistical Modeling with Critical Discussion Mode. Triggers on: machine…
Materials science toolkit. Crystal structures (CIF, POSCAR), phase diagrams, band structure, DOS, Materials Project integration, format conversion, for computational materials science.
Claude Code
$ npx -y skills add foryourhealth111-pixel/Vibe-Skills --skill pymatgen --agent claude-code
Codex
$ npx skills add foryourhealth111-pixel/Vibe-Skills --skill pymatgen -a codex -y
Cursor
$ npx skills add foryourhealth111-pixel/Vibe-Skills --skill pymatgen -a cursor -y
Gemini CLI
$ npx skills add foryourhealth111-pixel/Vibe-Skills --skill pymatgen -a gemini-cli -y
GitHub Copilot
$ npx skills add foryourhealth111-pixel/Vibe-Skills --skill pymatgen -a github-copilot -y
OpenCode
$ npx skills add foryourhealth111-pixel/Vibe-Skills --skill pymatgen -a opencode -y
Windsurf
$ npx skills add foryourhealth111-pixel/Vibe-Skills --skill pymatgen -a windsurf -y
name: pymatgen
description: Materials science toolkit. Crystal structures (CIF, POSCAR), phase diagrams, band structure, DOS, Materials Project integration, format conversion, for computational materials science.
license: MIT license
metadata:
skill-author: K-Dense Inc.Pymatgen is a comprehensive Python library for materials analysis that powers the Materials Project. Create, analyze, and manipulate crystal structures and molecules, compute phase diagrams and thermodynamic properties, analyze electronic structure (band structures, DOS), generate surfaces and interfaces, and access Materials Project's database of computed materials. Supports 100+ file formats from various computational codes.
This skill should be used when:
# Core pymatgen uv pip install pymatgen # With Materials Project API access uv pip install pymatgen mp-api # Optional dependencies for extended functionality uv pip install pymatgen[analysis] # Additional analysis tools uv pip install pymatgen[vis] # Visualization tools
from pymatgen.core import Structure, Lattice
# Read structure from file (automatic format detection)
struct = Structure.from_file("POSCAR")
# Create structure from scratch
lattice = Lattice.cubic(3.84)
struct = Structure(lattice, ["Si", "Si"], [[0,0,0], [0.25,0.25,0.25]])
# Write to different format
struct.to(filename="structure.cif")
# Basic properties
print(f"Formula: {struct.composition.reduced_formula}")
print(f"Space group: {struct.get_space_group_info()}")
print(f"Density: {struct.density:.2f} g/cm³")# Set up API key export MP_API_KEY="your_api_key_here"
from mp_api.client import MPRester
with MPRester() as mpr:
# Get structure by material ID
struct = mpr.get_structure_by_material_id("mp-149")
# Search for materials
materials = mpr.materials.summary.search(
formula="Fe2O3",
energy_above_hull=(0, 0.05)
)Create structures using various methods and perform transformations.
**From files:**
# Automatic format detection
struct = Structure.from_file("structure.cif")
struct = Structure.from_file("POSCAR")
mol = Molecule.from_file("molecule.xyz")**From scratch:**
from pymatgen.core import Structure, Lattice
# Using lattice parameters
lattice = Lattice.from_parameters(a=3.84, b=3.84, c=3.84,
alpha=120, beta=90, gamma=60)
coords = [[0, 0, 0], [0.75, 0.5, 0.75]]
struct = Structure(lattice, ["Si", "Si"], coords)
# From space group
struct = Structure.from_spacegroup(
"Fm-3m",
Lattice.cubic(3.5),
["Si"],
[[0, 0, 0]]
)**Transformations:**
from pymatgen.transformations.standard_transformations import (
SupercellTransformation,
SubstitutionTransformation,
PrimitiveCellTransformation
)
# Create supercell
trans = SupercellTransformation([[2,0,0],[0,2,0],[0,0,2]])
supercell = trans.apply_transformation(struct)
# Substitute elements
trans = SubstitutionTransformation({"Fe": "Mn"})
new_struct = trans.apply_transformation(struct)
# Get primitive cell
trans = PrimitiveCellTransformation()
primitive = trans.apply_transformation(struct)**Reference:** See `references/core_classes.md` for comprehensive documentation of Structure, Lattice, Molecule, and related classes.
Convert between 100+ file formats with automatic format detection.
**Using convenience methods:**
# Read any format
struct = Structure.from_file("input_file")
# Write to any format
struct.to(filename="output.cif")
struct.to(filename="POSCAR")
struct.to(filename="output.xyz")**Using the conversion script:**
# Single file conversion python scripts/structure_converter.py POSCAR structure.cif # Batch conversion python scripts/structure_converter.py *.cif --output-dir ./poscar_files --format poscar
**Reference:** See `references/io_formats.md` for detailed documentation of all supported formats and code integrations.
Analyze structures for symmetry, coordination, and other properties.
**Symmetry analysis:**
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
sga = SpacegroupAnalyzer(struct)
# Get space group information
print(f"Space group: {sga.get_space_group_symbol()}")
print(f"Number: {sga.get_space_group_number()}")
print(f"Crystal system: {sga.get_crystal_system()}")
# Get conventional/primitive cells
conventional = sga.get_conventional_standard_structure()
primitive = sga.get_primitive_standard_structure()**Coordination environment:**
from pymatgen.analysis.local_env import CrystalNN
cnn = CrystalNN()
neighbors = cnn.get_nn_info(struct, n=0) # Neighbors of site 0
print(f"Coordination number: {len(neighbors)}")
for neighbor in neighbors:
site = struct[neighbor['site_index']]
print(f" {site.species_string} at {neighbor['weight']:.3f} Å")**Using the analysis script:**
# Comprehensive analysis python scripts/structure_analyzer.py POSCAR --symmetry --neighbors # Export results p
Intelligent Skill routing and workflow orchestration for AI agents — +21.12 pp reward, −29.6% tokens on SkillsBench with DeepSeekV4Flash-VE.
LQF Machine Learning Expert Guide - Routed skill for ML/Statistical Modeling with Critical Discussion Mode. Triggers on: machine…
Cloud laboratory platform for automated protein testing and validation. Use when designing proteins and needing experimental…
This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting,…
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request…
Access real-time and historical stock market data, forex rates, cryptocurrency prices, commodities, economic indicators, and 50+…
Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design.…
Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…