科研 Skill

表面模型DFT计算

dft-surfaces

Covers surface slab model construction and DFT calculation: Miller-index generation, termination selection, slab/vacuum convergence. Use for surface science and catalysis DFT studies.

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

SKILL.md

DFT Surface Calculations

Description

This skill covers the construction and DFT calculation of surface slab models: Miller-index surface generation, termination selection, slab and vacuum thickness convergence, dipole corrections, surface energy and adsorption energy calculations, work function extraction, and ab initio surface phase diagrams. It integrates VASP and Quantum ESPRESSO as DFT backends with ASE and pymatgen for structure handling and analysis. Invoke this skill when studying adsorption, surface stability, catalytic reactions, surface reconstruction, work functions, or when generating surface structures for ML interatomic potential training.

Domain Context

A surface is modeled by the slab approximation: a finite-thickness periodic layer of solid separated from its periodic images by a vacuum gap. Both the solid and vacuum are periodic in the plane of the surface (xy), and the slab stack is repeated along the surface normal (z). The key approximation is that the slab is thick enough to recover bulk-like behavior in its interior and that the vacuum is wide enough to suppress interaction between periodic images.

Miller indices and surface orientation: A surface is specified by a Miller index (hkl), which defines the plane perpendicular to the [hkl] direction of the bulk conventional cell. The surface unit cell may be primitive (1×1) or reconstructed (e.g., Si(001) 2×1, Pt(111) √3×√3-R30°). High-index surfaces (stepped, kinked) have lower symmetry but are more reactive.

Surface termination: Many materials have multiple inequivalent terminations at the same (hkl). For example, Al₂O₃(0001) can terminate at Al or O; TiO₂(110) can be stoichiometric or reduced. Termination determines surface energy, adsorption site geometry, and stability under reaction conditions. Each termination must be modeled separately.

Symmetric vs. asymmetric slabs:

  • Asymmetric slab: top and bottom surfaces are different (e.g., top = Al-terminated, bottom = O-terminated). Has a net dipole moment in the z direction for polar surfaces. Requires dipole correction. Cannot extract individual surface energies from a single calculation without a reference.
  • Symmetric slab: top and bottom surfaces are identical; obtained by inversion symmetry or by cleaving at a mirror plane. No net dipole. Surface energy is unambiguous. Harder to construct for some terminations.

Polar surfaces: Surfaces of polar materials (e.g., ZnO(0001), MgO(111), perovskite (001) with different AO/BO₂ terminations) carry a macroscopic electric field that diverges with slab thickness unless the surface is reconstructed, passivated, or a compensating charge is introduced. Polar slabs require special treatment: reconstruction, surface hydroxylation, artificial compensating charge, or very careful reference-state matching. [EXPERT REVIEW NEEDED: the stability criterion for polar surfaces via Tasker classification is well-established but the practical DFT treatment of type-III polar slabs remains code- and system-dependent]

Dipole correction: For asymmetric slabs or surfaces with adsorbates on one side only, there is a net dipole in the z direction. This creates a spurious electric field across the vacuum that shifts the electrostatic potential on each side by a different amount, introducing an artificial Δ to the work function and adsorption energies. In VASP, LDIPOL=True + IDIPOL=3 applies an electrostatic correction. In QE, assume_isolated = 'esm' or tefield=.true., dipfield=.true. serve similar roles.

Adsorption sites: Standard adsorption sites on a surface are labeled by the local geometry: top (atop), bridge (between two atoms), hollow (above a surface vacancy — hcp or fcc hollow on FCC(111)). For stepped surfaces, additional sites exist at step edges, kinks, and terraces. Lateral interactions between adsorbates at finite coverage require either larger surface unit cells or explicit correction schemes (cluster expansion, lateral interaction models).

Slab relaxation: Only the surface layers (typically top 1–3) are allowed to relax; the bottom layers are frozen to mimic bulk. The number of relaxed layers is a convergence parameter. Using too few frozen layers causes the slab to distort and introduces artificial strain. Using too many relaxed layers increases cost without benefit once the relaxed depth saturates.

When to Use This Skill

  • Computing surface energies and identifying the thermodynamically stable termination of a material.
  • Calculating adsorption energies, binding geometries, and adsorption site preferences of molecules or atoms on a surface.
  • Determining the work function of a clean or adsorbate-covered surface.
  • Building surface phase diagrams (surface coverage as a function of temperature and gas-phase chemical potential).
  • Generating training structures for ML interatomic potentials targeting surface reactions or heterogeneous catalysis.
  • Studying surface reconstruction, relaxation, and rumpling under ultra-high-vacuum or reaction conditions.
  • Cross-referencing with STM, LEED, HREELS, or TPD experimental data on surface structure and adsorption.

When Not to Use This Skill

  • Amorphous surfaces or grain boundaries — these are not well-described by a single periodic slab; use large supercells with special quasi-random structures or interface models instead.
  • Liquid–solid or electrochemical interfaces — the electrolyte environment requires explicit solvent molecules, implicit solvent models (VASPsol, SCCS), or grand-canonical DFT; this skill covers vacuum surfaces only.
  • Surfaces at very high temperature — thermal disorder, reconstruction dynamics, and anharmonic effects require ab initio MD or machine-learning MD on slab models, not static DFT alone.
  • Catalytic reaction rates — transition state searches (NEB, dimer) and microkinetic modeling are beyond this skill's scope; use after adsorption energies are established.
  • Very large unit cells (> 200 atoms) — cost scales linearly with slab atoms times k-points; consider ML potentials for structural sampling and DFT only for single-point corrections.
  • Surfaces of strongly correlated oxides without DFT+U or hybrid correction — PBE surface energies and adsorption energies for NiO, CoO, Fe₂O₃ surfaces are qualitatively wrong without a Hubbard correction.

Core Concepts

Full steps for each part are in references/core-concepts/; open the one you need:

Key Workflows

Full steps for each part are in references/key-workflows/; open the one you need:

Common Failure Modes

Failure ModeSymptomsLikely CauseDiagnosticFix
Slab too thinSurface energy changes by > 0.05 J/m² when adding layers; adsorption energies not convergedToo few layers; surface perturbation reaches bottomRun thickness convergence (Workflow 3); check if bottom layers still show surface-like distortionAdd 2 layers at a time until convergence < 0.01 J/m²
Insufficient vacuumElectrostatic potential not flat in vacuum; work function shows thickness dependence; forces on topmost atom are non-zeroPeriodic images interact through vacuumCheck LOCPOT planarly averaged potential for flatness; must be flat over ≥ 5 ÅIncrease vacuum to 15–20 Å; use dipole correction
Missing dipole correctionWork function from each face differs by wrong amount; adsorption on one face shifts energies on the other; net dipole in OUTCARAsymmetric slab has net dipole in z; spurious field crosses vacuumCheck DIPOL tag and NELM output for net cell dipole; check LVHAR potential asymmetryAdd LDIPOL=True, IDIPOL=3
Wrong adsorbate reference stateCO adsorption energy off by 0.5–1 eV vs literatureO₂ overbinding not corrected; wrong spin state for gas molecules; incorrect box size for gas referenceRecalculate gas reference with identical ENCUT, spin-polarized for triplet O₂ and doublet NO; check vacuum box ≥ 12 ÅApply Wang-Ceder-Dabo correction for O; use same ENCUT and PREC as slab
ISIF=3 applied to slabCell volume and shape change; slab contracts along z; unphysical pressureVariable-cell relaxation not appropriate for slabsCheck ISIF in INCAR; look for large cell changes in OUTCARSet ISIF=2 for all slab calculations; only use ISIF=3 for bulk
Unconverged k-meshSurface energy and adsorption energy oscillate; Γ-centered mesh with even N gives non-Γ k-pointsk-mesh too coarse for metallic surface; or Monkhorst-Pack without Γ centeringRun k-mesh convergence (8×8×1, 12×12×1, 16×16×1) and check convergenceUse Γ-centered mesh; increase density until ΔE_ads < 0.01 eV
Non-equivalent slab surfaces comparedSurface energies or adsorption energies inconsistent across cellsDifferent terminations or different relaxation states in slab A vs slab BVisualize both surfaces; check adsorbate coverage, surface composition, and relaxation depthUse identical slab setups (same N_layers, N_fixed, vacuum, termination)
Polar surface without correctionSurface energy diverges with slab thickness; VASP may have SCF convergence issuesType-III polar slab (Tasker type 3) with uncompensated surface chargeCheck if surface is Tasker type 3; plot E vs thickness — linear growth signals divergenceSymmetrize, passivate, or apply fractional-charge correction; see Tasker (1979)
Artificial reconstruction in small cellAdsorbate distorts lattice by more than ±5% in-plane; surface cell changes shapeAdsorbate-induced strain confined to small cell; image interactionsCheck cell dimensions vs bulk; compute strain tensorUse a larger surface supercell (2×2 or 3×3)
Fixed too few bottom layersBottom atoms relax significantly; slab behaves like a moleculeOnly 1–2 bottom layers frozen; thin slab floats and re-relaxes bulkCheck force on supposedly fixed atoms in OUTCAR; monitor z-displacement of bottom layerFix at least N_fixed = round(N_layers/2) layers; minimum 2
LREAL=Auto for forcesForce errors ~1–5 meV/Å; adsorption geometry slightly offReal-space projection for large supercells introduces force noiseCompare forces from LREAL=Auto vs LREAL=False single-pointUse LREAL=False for final single-point calculations of adsorption energies
Spin state not convergedMagnetic surface (NiO, Fe₂O₃, FexOy) gives wrong energy; DOS looks metallicInitial magnetic moments wrong; ISPIN=1 for magnetic materialCheck MAGMOM in INCAR; check NUPDOWN; run with different MAGMOM initializationsSet ISPIN=2, MAGMOM per atom, LORBIT=11; use DFT+U for correlated oxides
Site selection biasClaiming one site is most stable from only one calculationOnly top site computed; bridge or hollow may be more favorableCompute all symmetry-inequivalent sites from AdsorbateSiteFinderAlways screen all inequivalent sites; report lowest-energy site
MLP surface energy divergence from DFTMLP γ differs by > 0.3 J/m² from DFT; surface structure qualitatively wrongMLP trained only on bulk; surface environments extrapolateCheck MLP uncertainty at surface atoms; compare force RMSE on surface structuresAdd surface slab structures to training set; use active learning on surface

Best Practices

Structure setup:

  • Always start from a fully relaxed bulk structure (ISIF=3 convergence to EDIFFG=-1e-3 or tighter) before constructing slabs. A strained bulk geometry propagates errors through the entire surface calculation.
  • Use pymatgen.core.surface.SlabGenerator with symmetrize=True when possible — symmetric slabs with no net dipole give unambiguous surface energies.
  • For non-symmetric terminations, always construct a complementary slab with the inverse termination to decouple γ_top and γ_bottom.
  • Check that the surface area (in-plane cell) is large enough to avoid lateral adsorbate-adsorbate interactions. Rule of thumb: adsorbate–adsorbate distance > 6 Å for non-covalent species; for CO/NO/OH, use at least 2×2 cells.

Convergence:

  • Always run both thickness and vacuum convergence before reporting surface energies or adsorption energies. Treat these as mandatory, not optional.
  • k-point density in the surface plane must match the bulk-equivalent density; the bulk k-mesh projects to a 2D mesh for the surface cell. A 12×12×12 bulk mesh on a 1×1 cell → 12×12×1 for the 1×1 slab.
  • For metals, use Methfessel-Paxton smearing (ISMEAR=1, SIGMA=0.1). For semiconductors and insulators, use Gaussian (ISMEAR=0, SIGMA=0.05). Always extrapolate to σ→0 if using large smearing.

DFT settings for surfaces:

  • ISIF=2 (relax ions only, fixed cell). Never use ISIF=3 for slabs.
  • LDIPOL=True, IDIPOL=3 for all asymmetric slabs and any calculation with adsorbates on one side only.
  • LVTOT=True or LVHAR=True to enable work function extraction from LOCPOT.
  • Use LREAL=Auto for relaxation of large supercells (> ~80 atoms), but always do a final single-point with LREAL=False for accurate energies and forces.
  • Set NSW=0 for all single-point energy calculations.

Reference states:

  • Always document which reference states were used for adsorption energies (molecular, atomic, or elemental gas phase; corrected or uncorrected for O₂ overbinding).
  • For oxygen-containing species: use the water-formation route for O reference or explicitly state the O₂ correction applied.
  • Report adsorption energies with the sign convention defined (negative = exothermic is standard in heterogeneous catalysis, but some communities use the reverse).
  • Compare against multiple experimental or high-level theoretical benchmarks before reporting new adsorption energies as reference values.

MLP validation on surfaces:

  • Never deploy an MLP for surface chemistry based on bulk validation alone. Surface environments differ fundamentally from bulk.
  • Always compute surface energy and at least one adsorption energy with both DFT and MLP for each new surface.
  • Add surface training structures (clean slab, adsorbate-covered, defect-containing) to the training set if surface errors exceed 0.15 J/m² or 0.1 eV respectively.

Reproducibility:

  • Archive: bulk POSCAR, slab POSCAR (all terminations), INCAR for each stage, KPOINTS, POTCAR SHA, phonopy.yaml if used, BORN file if polar. The slab construction script and all parameters (Miller index, N_layers, N_fixed, vacuum, displacement, coverage) must be recorded.

Integration with Other Skills

Upstream (required before surface calculations):

  • VASP Workflow — bulk relaxation (ISIF=3) provides the equilibrium lattice constant and POTCAR for the surface. All VASP INCAR patterns, job submission, and convergence checking protocols from the VASP workflow skill apply to slab calculations.
  • DFT Convergence — ENCUT, k-mesh, and EDIFF convergence for bulk must be established before constructing slabs. Phonon-grade convergence (ENCUT≥550, EDIFF=1e-8, LREAL=False) is required for accurate surface energies and adsorption energies.
  • Quantum ESPRESSO Workflow — QE pw.x is an alternative DFT backend for surface calculations; pseudopotential choice and convergence settings follow the QE skill. assume_isolated and tefield settings replace VASP LDIPOL for dipole corrections.
  • ASE Framework — slab construction (Workflow 1, 7), adsorbate placement, constraint setup, and file conversion all use ASE. The FixAtoms constraint and AdsorbateSiteFinder are the core ASE/pymatgen tools for surface structure preparation.
  • Pymatgen Analysis — SlabGenerator, AdsorbateSiteFinder, and Structure.from_file for slab and adsorbate configuration management. Cross-referencing against the Materials Project surface energy database for validation. [FORWARD REFERENCE — skill may be in progress]

Downstream consumers (surface outputs feed into):

  • DFT Phonons — surface phonons and adsorbate vibrational modes (e.g., C-O stretch frequency as a Brønsted-Evans-Polanyi proxy) are computed using the phonon skill on slab supercells. Imaginary surface modes distinguish reconstruction from slab thickness artifacts.
  • DFT Defects — surface vacancies (O vacancies in oxide surfaces, surface cation vacancies) are a subclass of defects requiring the defect skill's charge correction and formation energy framework. [FORWARD REFERENCE — skill not yet created]
  • DFT Dataset Generation — surface slab structures, adsorption configurations, and displaced supercells for surface phonons form key components of DFT training datasets for MLP surface chemistry.
  • MLP Validation — surface energy and adsorption energy comparison (Workflow 8) is a required validation step for MLPs targeting surface reactions. The same metrics (RMSE, MAE, sign of adsorption energy) used for bulk validation apply here but with surface-specific reference states.
  • MACE Training — surface slab single-points and displaced supercells are added to MACE training datasets when surface energy or adsorption energy errors exceed tolerance. Workflow 8 identifies which surface environments require additional training data.
  • Active Learning MLP — active learning on surface trajectories (MD on slabs, NEB path sampling) identifies surface configurations underrepresented in the training set. High-uncertainty surface configurations from MLP ensemble disagreement are queued for DFT labeling.

Visualization and reproducibility:

  • Scientific Visualization — electrostatic potential plots (work function, dipole correction), surface phase diagrams, adsorption energy heatmaps by site, and comparison plots between DFT and MLP surface quantities.
  • Reproducibility Workflow — surface calculations involve many coupled files (bulk POSCAR → slab POSCAR → adsorbate POSCARs → OUTCARs → LOCPOT) that must be versioned and archived with clear provenance from bulk through adsorption.

Key References

  1. Reuter, K. & Scheffler, M. (2002). "Composition, structure, and stability of RuO₂(110) as a function of oxygen pressure." Physical Review B 65, 035406. The seminal ab initio thermodynamics surface phase diagram paper; must be cited when using Workflow 6.
  2. Tasker, P. W. (1979). "The stability of ionic crystal surfaces." Journal of Physics C: Solid State Physics 12, 4977–4984. Classification of polar vs. non-polar surfaces (Tasker types I–III); foundational for polar surface treatment.
  3. Bader, R. F. W. (1990). Atoms in Molecules: A Quantum Theory. Oxford University Press. Charge partitioning for surface adsorption charge transfer analysis; widely used alongside Bader charge code.
  4. Methfessel, M. & Paxton, A. T. (1989). "High-precision sampling for Brillouin-zone integration in metals." Physical Review B 40, 3616. Methfessel-Paxton smearing for metals; the standard for metallic surface calculations.
  5. Norskov, J. K., Bligaard, T., Logadottir, A., Bahn, S., Hansen, L. B., Bollinger, M., Bengaard, H., Hammer, B., Sljivancanin, Z., Mavrikakis, M., Xu, Y., Dahl, S. & Jacobsen, C. J. H. (2002). "Universality in heterogeneous catalysis." Journal of Catalysis 209, 275–278. Adsorption energy descriptor framework; motivates why accurate surface adsorption energies matter.
  6. Wang, L., Maxisch, T. & Ceder, G. (2006). "Oxidation energies of transition metal oxides within the GGA+U framework." Physical Review B 73, 195107. The O₂ overbinding correction reference; cite when applying the Wang-Ceder-Dabo correction.
  7. Henkelmann, G., Arnaldsson, A. & Jonsson, H. (2006). "A fast and robust algorithm for Bader decomposition of charge density." Computational Materials Science 36, 354–360. Bader charge analysis code and method.
  8. Setyawan, W. & Curtarolo, S. (2010). "High-throughput electronic band structure calculations: Challenges and tools." Computational Materials Science 49, 299–312. BZ path conventions used for surface phonon band structures.

[EXPERT REVIEW NEEDED: Verify that the dipole correction implementation in VASP (LDIPOL/IDIPOL=3) is equivalent to the ESM method in Quantum ESPRESSO for common benchmarks. Confirm that the O₂ correction scheme chosen (+1.36 eV vs. water-formation-route) is appropriate for PBE and not PBEsol. Review whether MLP surface validation thresholds (0.2 J/m² for surface energy, 0.1 eV for adsorption energy) are appropriate for all material classes or should be tightened for catalysis applications.]

示例提示词

帮我构建这个晶面的Slab模型并计算吸附能与功函数。

所属插件

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

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

同插件的其他科研 Skill

常见问题

表面模型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。

如何安装表面模型DFT计算?

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

表面模型DFT计算需要哪些权限?

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

表面模型DFT计算经过官方审核吗?

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