科研 Skill

弹性常数计算工作流

elastic-constants-workflow

Computes single-crystal and polycrystalline elastic constants from DFT or MD stress-strain data and checks mechanical stability. Use when deriving stiffness tensors or bulk/shear modulus.

发布者 Codar安全审核通过v0.1.0更新于 2026-11-18

SKILL.md

Elastic Constants Workflow

Purpose

Compute the full elastic stiffness tensor C_ij of a crystal from first-principles (VASP, Quantum ESPRESSO, CP2K) or classical/ML-potential molecular dynamics (LAMMPS), reduce it to engineering moduli (bulk, shear, Young's modulus, Poisson ratio) via Voigt-Reuss-Hill averaging, and check that the result is physically admissible (positive-definite, satisfies the Born stability criteria). This skill sits between a converged structure (from vasp-workflow, quantum-espresso, cp2k-workflow, or lammps-workflow) and any downstream mechanical, phase-field, or crystal-plasticity model that needs elastic properties as input.

When to Use This Skill

Activate when the request involves:

  • "Compute the elastic constants of this structure," "is this phase mechanically stable," "what is the bulk/shear modulus from DFT/MD," "Voigt-Reuss-Hill average," "elastic anisotropy."
  • Feeding elastic constants into crystal-plasticity-workflow (Schmid factors need single-crystal moduli), phase-field-workflow (elastic energy terms), or finite-element-modeling (homogenized polycrystalline input).
  • Validating an ML interatomic potential's elastic response against DFT (mlp-validation references this skill for the elastic-constants check).

Not for extracting elastic constants from experimental techniques (nanoindentation, resonant ultrasound spectroscopy, tensile testing) — see mechanical-testing for that; this skill is simulation-side only.

Two Computational Methods

1. Stress-strain (finite strain) method — preferred for DFT

Apply a small set of symmetry-inequivalent strains (typically |epsilon| = 0.5-1% to stay in the linear-elastic regime while avoiding numerical noise), relax only the internal atomic positions at fixed strained cell (not the cell itself), and read off the resulting stress tensor. The elastic constants are the linear-response coefficients:

sigma_i = C_ij * epsilon_j     (Voigt notation, i,j = 1..6)

Workflow:

  1. Fully relax the unstrained structure (ionic + cell) and confirm it is at a true energy minimum — residual stress above ~1-5 kbar (DFT) contaminates the extracted C_ij.
  2. Generate the minimal set of deformation matrices required by the crystal's point-group symmetry (3 independent strains for cubic, up to 21 for triclinic; use a tool such as pymatgen.analysis.elasticity or ASE's elastic-constants helpers to generate the symmetry-reduced strain set rather than guessing it by hand).
  3. For each strain, run a static (or ions-only-relaxed) calculation and extract the stress tensor; fit sigma vs. epsilon by linear (or, to check linearity, low-order polynomial) regression over at least 3-5 strain magnitudes per direction, including both signs (+/-epsilon) to cancel second-order error.
  4. Assemble C_ij from the fitted slopes according to the crystal symmetry's independent-constant pattern (see table below).

2. Energy-strain (stress-free) method — needed when stress output is unreliable

Fit the strain-energy density E(epsilon)/V to a quadratic in epsilon instead of reading stresses directly. More robust when the code's stress tensor is noisy or unavailable, but requires finer strain sampling (more points) because curvature is a second derivative and therefore more sensitive to numerical noise than a linear stress fit.

3. MD / ML-potential route

Either apply the same finite-strain protocol to a locally relaxed, zero-temperature static configuration (the DFT-style method, most comparable to DFT C_ij), or compute the finite-temperature elastic tensor from stress-fluctuation/Parrinello- Rahman formulas during an NPT or NVT trajectory. The two give different quantities — static (0 K, "athermal") versus finite-temperature elastic constants — and must not be compared directly to each other or to experimental room-temperature data without acknowledging the difference.

Independent Constants by Crystal Symmetry

SymmetryIndependent C_ijExample
Cubic3 (C11, C12, C44)Fe (BCC), Al, Cu, Si
Hexagonal5 (C11, C12, C13, C33, C44)Mg, Ti (HCP), Zn
Tetragonal6-7Sn, TiO2 (rutile)
Orthorhombic9Many minerals, some intermetallics
Monoclinic13Lower-symmetry oxides
Triclinic21No symmetry restriction

Always generate the strain set from the actual detected space group, not an assumed one — a slightly distorted cell (e.g., a relaxed structure that is nominally cubic but numerically triclinic to the tolerance used) silently produces a full 21-constant fit instead of exploiting symmetry, inflating both cost and fit noise.

Mechanical (Born) Stability Criteria

A computed stiffness tensor must satisfy symmetry-specific Born stability conditions before it is used for anything downstream; a structure that fails them is mechanically (elastically) unstable at that volume/pressure, which is itself a meaningful physical result (e.g., it signals a displacive instability or an unphysical relaxation), not merely a numerical error to be explained away.

Cubic case (most common first check):

C11 - C12 > 0
C11 + 2*C12 > 0
C44 > 0

For hexagonal, tetragonal, orthorhombic, etc., use the symmetry-specific determinant/eigenvalue conditions on the 6x6 (Voigt) stiffness matrix rather than the cubic shortcuts above; the general, symmetry-agnostic check is that the full 6x6 C matrix must be positive-definite (all eigenvalues > 0).

Voigt-Reuss-Hill Polycrystalline Averaging

Single-crystal C_ij are anisotropic; most engineering use (and comparison to polycrystalline experimental data) needs isotropic-averaged bulk modulus K and shear modulus G:

  • Voigt average (uniform-strain assumption): upper bound, K_V and G_V from linear combinations of C_ij.
  • Reuss average (uniform-stress assumption, via the compliance tensor S = C^-1): lower bound, K_R and G_R.
  • Hill average: K_H = (K_V + K_R)/2, G_H = (G_V + G_R)/2 — the standard reported value, an empirical (not variational) average that in practice tracks experiment well for weakly-to-moderately anisotropic materials.

From K_H and G_H: Young's modulus E = 9KG/(3K+G), Poisson ratio nu = (3K-2G)/(2(3*K+G)).

Elastic anisotropy (zener ratio for cubic: A = 2C44/(C11-C12), universal anisotropy index A^U = 5(G_V/G_R) + (K_V/K_R) - 6 for any symmetry) quantifies how far the material is from isotropic; report it alongside K_H/G_H rather than presenting the isotropic average as if direction did not matter, especially for hexagonal and lower-symmetry phases.

Prerequisites

  • A fully relaxed structure (atomic positions and cell) at the volume/pressure of interest, converged per dft-convergence (cutoff, k-points) before any strain is applied — unconverged DFT settings bias C_ij systematically.
  • A code capable of returning the stress tensor (VASP, QE, CP2K, LAMMPS all support this) or, for the energy-strain route, high-precision total energies at fixed strain.
  • Point-group/space-group information for the relaxed structure (via pymatgen-analysis or spglib) to generate the minimal symmetry-reduced strain set.

Limitations

  • Strain magnitude is a genuine trade-off: too large breaks the linear (harmonic) assumption underlying C_ij; too small is swamped by DFT/MD numerical noise. There is no universal "correct" value — always fit over multiple magnitudes and confirm linearity (or near-zero curvature) rather than trusting a single-strain finite-difference estimate.
  • Static (0 K) DFT elastic constants systematically differ from finite-temperature experimental values (typically softer at elevated temperature); do not compare them directly without either a quasi-harmonic/MD temperature correction or an explicit caveat.
  • Results for metals with partial occupancies, magnetic ordering, or near structural instabilities (soft modes) are sensitive to smearing, k-point density, and magnetic configuration; cross-check against dft-phonons — a dynamically unstable phonon spectrum (imaginary frequencies) is a more sensitive instability indicator than the Born criteria alone and the two should agree.
  • This skill does not compute elastic constants from experiment; it does not replace resonant ultrasound spectroscopy or nanoindentation-derived moduli, which belong to mechanical-testing.

Quality Checks

  • The strain set used matches the structure's actual detected symmetry, not an assumed one.
  • Stress (or energy) versus strain is checked for linearity (or quadratic fit quality for the energy route) across at least 3-5 strain magnitudes per direction before extracting C_ij.
  • The full 6x6 stiffness matrix is reported (or at least checked) for positive-definiteness, not only the symmetry-specific shortcut inequalities.
  • Voigt, Reuss, and Hill values are all reported (not only Hill) so the spread communicates the material's anisotropy.
  • Static DFT/MD results are explicitly labeled as 0 K (or simulation-temperature) values when compared to room-temperature experimental moduli.

示例提示词

帮我从DFT应力应变数据计算这个晶体的弹性常数并检查力学稳定性。

所属插件

计算材料学:第一性原理与原子模拟面向计算材料研究:DFT 与第一性原理(VASP、Quantum ESPRESSO、CP2K、AiiDA)、缺陷/表面/声子/弹性常数、机器学习势函数训练与验证、分子动力学与增强采样、晶体性质图神经网络与生成模型。

安装该插件会一并获得同领域的 35 个 Skill / MCP。

同插件的其他科研 Skill

常见问题

弹性常数计算工作流能做什么?

Computes single-crystal and polycrystalline elastic constants from DFT or MD stress-strain data and checks mechanical stability. Use when deriving stiffness tensors or bulk/shear modulus。

如何安装弹性常数计算工作流?

在科搭 Codar 左侧点击「插件」,在「组件」页签搜索「弹性常数计算工作流」并安装;在 Claude Code 或 Codex 中可以发送本页的安装提示词,或下载 Skill 包后解压到 ~/.claude/skills 或 ~/.codex/skills。

弹性常数计算工作流需要哪些权限?

该科研 Skill没有声明额外权限;执行具体操作时仍由 Agent 按自身规则请求确认。

弹性常数计算工作流经过官方审核吗?

是。SpeedSkills 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。