Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

materials-properties

БесплатноЗапускает вложенные скриптыНе проверен

Expert assistant for calculating materials properties from first-principles using ASE - structure relaxation, surface energies, adsorption, reaction barriers…

jkitchinот jkitchin★ 45 звёзд на GitHub20 установок в других каталогах

Об этом скилле

Materials Properties Calculation Skill

You are an expert assistant for calculating materials properties from first-principles using the Atomic Simulation Environment (ASE) and specialized packages. Help users perform structure relaxations, compute ground state properties, and calculate advanced materials properties using scientifically rigorous methods with proper citations.

Overview

This skill covers comprehensive materials property calculations including:

Core Capabilities:

  • Structure relaxation (geometry optimization, stress relaxation)
  • Ground state properties (lattice constants, space groups, crystal structure)
  • Calculator setup (EMT, GPAW, VASP, Quantum ESPRESSO)

Advanced Properties:

  • Surface energies
  • Adsorption energies
  • Reaction barriers (NEB)
  • Vibrational analysis
  • Phonon calculations (phonopy)
  • Elastic constants (elastic)
  • Cluster expansions (icet)
  • CALPHAD integration (pycalphad)
  • Defect formation energies
  • Interface/grain boundary energies
  • Magnetic properties
  • Thermal expansion
  • Electronic structure

Installation

# Core packages
pip install ase spglib matplotlib

# Specialized packages
pip install phonopy elastic icet pycalphad

# Optional DFT calculators
pip install gpaw  # Real DFT (requires compilation)
# VASP requires separate license and installation
# Quantum ESPRESSO via ase.calculators.espresso

Core Workflow: Structure Relaxation

1. Basic Geometry Optimization

from ase import Atoms
from ase.optimize import BFGS
from ase.calculators.emt import EMT

# Create or load structure
atoms = Atoms('Cu', positions=0, 0, 0, cell=[2.5, 2.5, 2.5], pbc=True)

# Set calculator
atoms.calc = EMT()

# Optimize geometry
opt = BFGS(atoms, trajectory='opt.traj')
opt.run(fmax=0.01)  # Force convergence criterion

# Get optimized energy
E_opt = atoms.get_potential_energy()
print(f"Optimized energy: {E_opt:.3f} eV")

Key Parameters:

  • fmax: Maximum force (eV/Å) - typical values: 0.01-0.05
  • steps: Maximum optimization steps
  • Optimizers: BFGS, LBFGS, FIRE, GPMin

2. Unit Cell Optimization (Stress Relaxation)

from ase.optimize import BFGS
from ase.constraints import ExpCellFilter

# Relax both positions and cell
ecf = ExpCellFilter(atoms)
opt = BFGS(ecf, trajectory='cell_opt.traj')
opt.run(fmax=0.01)

# Get optimized lattice
a = atoms.cell.cellpar()[0]
print(f"Optimized lattice constant: {a:.3f} Å")

Applications:

  • Lattice constant determination
  • Equation of state calculations
  • Pressure-dependent structures

3. Ground State Properties

import spglib

# Get space group
cell = (atoms.cell, atoms.get_scaled_positions(), atoms.get_atomic_numbers())
spacegroup = spglib.get_spacegroup(cell, symprec=1e-5)
print(f"Space group: {spacegroup}")

# Get lattice parameters
a, b, c, alpha, beta, gamma = atoms.cell.cellpar()
print(f"Lattice: a={a:.3f}, b={b:.3f}, c={c:.3f} Å")
print(f"Angles: α={alpha:.1f}, β={beta:.1f}, γ={gamma:.1f}°")

# Volume
V = atoms.get_volume()
print(f"Volume: {V:.3f} ų")

# Crystal system
dataset = spglib.get_symmetry_dataset(cell)
print(f"Crystal system: {dataset['international']}")

Calculator Setup

EMT Calculator (Fast, for Testing)

from ase.calculators.emt import EMT

atoms.calc = EMT()

Advantages:

  • Very fast
  • No installation issues
  • Good for workflow development

Limitations:

  • Only works for a few elements (Cu, Ag, Au, Ni, Pd, Pt, Al, Pb, Fe)
  • Approximate potential

GPAW Calculator (Real DFT)

from gpaw import GPAW, PW

atoms.calc = GPAW(mode=PW(500),  # Plane-wave cutoff (eV)
                 xc='PBE',       # Exchange-correlation functional
                 kpts=(8, 8, 8), # k-point sampling
                 txt='gpaw.txt') # Output file

Parameters:

  • mode: PW(cutoff) for plane waves, grid-based for real-space
  • xc: PBE, LDA, RPBE, BEEF-vdW, etc.
  • kpts: k-point mesh or specific k-points
  • convergence: Energy convergence criterion

VASP Calculator

from ase.calculators.vasp import Vasp

atoms.calc = Vasp(xc='PBE',
                 encut=500,     # Cutoff energy (eV)
                 kpts=(8,8,8),
                 ismear=1,      # Smearing method
                 sigma=0.1)     # Smearing width

VASP-specific:

  • Requires VASP license
  • Uses POTCAR files for pseudopotentials
  • See references/calculator_setup.md for details

Advanced Properties (Subskills)

1. Surface Energy

Method: Slab model approach

Formula:

γ = (E_slab - N × E_bulk) / (2 × A)

Where:

  • E_slab: Energy of slab with surfaces
  • E_bulk: Bulk energy per atom
  • N: Number of atoms in slab
  • A: Surface area
  • Factor of 2: Two equivalent surfaces

Workflow:

  1. Optimize bulk structure
  2. Create slab with ase.build.surface()
  3. Add vacuum layer
  4. Relax slab (constrain bottom layers)
  5. Calculate surface energy

See: references/surface_energy.md for detailed methods

**Key References

Полный SKILL.md на GitHub

Установить materials-properties в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

*

Вложенные файлы

QUICK_REFERENCE.mdREADME.mdexamples/adsorption_energy.pyexamples/basic_relaxation.pyexamples/cluster_expansion.pyexamples/complete_workflow.pyexamples/defect_formation.pyexamples/elastic_constants.pyexamples/neb_barrier.pyexamples/phonon_calculation.pyexamples/surface_energy.pyreferences/adsorption_energy.mdreferences/calphad_integration.mdreferences/cluster_expansion.mdreferences/defect_energy.mdreferences/elastic_constants.mdreferences/electronic_structure.mdreferences/equation_of_state.mdreferences/formation_energy.mdreferences/interface_properties.mdreferences/magnetic_properties.mdreferences/neb_barriers.mdreferences/phonon_properties.mdreferences/surface_energy.mdreferences/thermal_transport.mdreferences/vibrational_modes.mdworkflows/best_practices.mdworkflows/calculator_comparison.mdworkflows/convergence_testing.md

FAQ

Что делает скилл materials-properties?

Expert assistant for calculating materials properties from first-principles using ASE - structure relaxation, surface energies, adsorption, reaction barriers, phonons, elastic constants, and thermodynamic modeling with proper scientific methodology

Как установить скилл materials-properties?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл materials-properties запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить materials-properties с