科研 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.
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), orfinite-element-modeling(homogenized polycrystalline input). - Validating an ML interatomic potential's elastic response against DFT
(
mlp-validationreferences 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:
- 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.
- 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.elasticityor ASE's elastic-constants helpers to generate the symmetry-reduced strain set rather than guessing it by hand). - 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.
- 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
| Symmetry | Independent C_ij | Example |
|---|---|---|
| Cubic | 3 (C11, C12, C44) | Fe (BCC), Al, Cu, Si |
| Hexagonal | 5 (C11, C12, C13, C33, C44) | Mg, Ti (HCP), Zn |
| Tetragonal | 6-7 | Sn, TiO2 (rutile) |
| Orthorhombic | 9 | Many minerals, some intermetallics |
| Monoclinic | 13 | Lower-symmetry oxides |
| Triclinic | 21 | No 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-analysisor 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应力应变数据计算这个晶体的弹性常数并检查力学稳定性。
所属插件
安装该插件会一并获得同领域的 35 个 Skill / MCP。
同插件的其他科研 Skill
- 主动学习构建机器学习势训练集Runs active-learning workflows for ML interatomic potentials: uncertainty-guided MD exploration, DFT oracle labeling, query strategy. Use when expanding an MLP training set.
- AiiDA计算工作流管理Covers AiiDA, a provenance-first Python workflow engine for computational materials science: calculation input generation, remote submission. Use when orchestrating reproducible DFT/MD campaigns.
- ASE原子模拟环境Covers the Atomic Simulation Environment (ASE) as an atomistic workflow hub: Atoms objects, calculators, optimizers, trajectories. Use when scripting or converting structures across DFT/MD codes.
- 粗粒化分子动力学模拟Covers coarse-grained molecular dynamics: mapping atomistic structures to CG beads, parameterizing Martini/IBI/force-matching force fields. Use when atomistic timescales are too short.
- CP2K第一性原理分子动力学Covers end-to-end DFT, AIMD, and atomistic workflows with CP2K using the Gaussian-and-plane-waves method: input construction, convergence testing. Use for CP2K-based simulations.
- 扩散模型生成晶体结构Covers de novo crystal structure generation with score-based diffusion and flow-matching models (MatterGen, DiffCSP, CDVAE). Use when generating candidate structures, not analyzing existing ones.
- 晶体图神经网络性质预测Covers graph neural networks for crystal and periodic-material property prediction: crystal graph construction, periodic neighbor finding. Use when building GNN property predictors for crystals.
- 平面波DFT收敛性测试Covers systematic convergence testing for plane-wave DFT: cutoff energy, k-point mesh density, smearing. Use before trusting DFT energies, forces, or derived properties as converged.
- 机器学习势DFT数据集生成Covers generating DFT-labeled datasets for training ML interatomic potentials: configuration-space coverage. Use when building an MLP training dataset from scratch.
- 点缺陷第一性原理计算Covers first-principles point-defect modeling: vacancy/interstitial/antisite/substitutional construction, charge-state calculations. Use for defect thermodynamics studies.
- 第一性原理声子谱计算Covers lattice dynamics from first principles: phonon dispersion, phonon DOS. Use when computing vibrational or thermodynamic properties from DFT.
- 表面模型DFT计算Covers surface slab model construction and DFT calculation: Miller-index generation, termination selection, slab/vacuum convergence. Use for surface science and catalysis DFT studies.
- 增强采样自由能计算Covers enhanced sampling methods for atomistic MD (metadynamics, umbrella sampling. Use for rare-event or slow-transition sampling.
- 状态方程拟合Covers equation-of-state fitting from DFT/ML-potential energy-volume data: Birch-Murnaghan, Vinet, and Murnaghan forms. Use when fitting an EOS to compression data.
- 机器学习势微调迁移训练Covers fine-tuning pretrained universal ML interatomic potentials on system-specific DFT data. Use when adapting a universal MLP to a new system.
- 分子动力学自由能计算Covers quantitative free-energy calculations from MD: alchemical FEP/TI/BAR/MBAR, umbrella-sampling PMF. Use when computing thermodynamic free energies from simulation.
- GROMACS分子动力学工作流Covers end-to-end MD simulations with GROMACS: topology/.mdp construction, energy minimization, NVT/NPT equilibration. Use for GROMACS-based biomolecular or materials MD.
- 高通量DFT自动化筛选Covers automated large-scale DFT screening: workflow graphs with atomate2/jobflow/AiiDA, input-set standardization, custodian error handling. Use for high-throughput DFT screening campaigns.
- LAMMPS分子动力学工作流Covers end-to-end MD simulations with LAMMPS: input script anatomy, force-field deployment, ensemble control, equilibration. Use for LAMMPS-based classical molecular dynamics.
- MACE机器学习势训练Covers training MACE machine-learned interatomic potentials: extxyz dataset preparation, isolated-atom energies, train/val/test splitting. Use for MACE-specific MLP training workflows.
- MatGL图神经网络框架Covers building, applying, validating, and fine-tuning MatGL graph-neural-network models for property prediction and interatomic potentials. Use for pretrained GNN workflows via MatGL.
- 分子动力学轨迹后处理分析Covers quantitative post-processing of atomistic MD trajectories: loading LAMMPS/GROMACS/ASE trajectories and computing RDF, coordination numbers. Use for structural MD trajectory analysis.
- 分子动力学平衡过程设计Covers bringing an atomistic simulation from its initial configuration to a representative equilibrium state before production statistics: ensemble. Use before collecting production MD data.
- 分子动力学力场选型验证Covers selection, validation, and deployment of classical interatomic force fields for MD: physical basis and transferability limits of EAM, MEAM, Tersoff. Use when choosing a force field.
常见问题
弹性常数计算工作流能做什么?
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 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。