Skip to content

3.3 Relax the cell and validate stress

These educational templates have not been executed and contain no fabricated numerical results. Inputs and filenames follow ABACUS 3.9.0 documentation; recheck every interface when changing version.

3.3.1 Question and declared model

Which lattice and atomic positions minimize bulk silicon's enthalpy at a declared external pressure? Extend the converged first PW silicon calculation to variable-cell relaxation. Unlike the water example, this is a genuine periodic bulk material. A low force alone is insufficient: a perfect high-symmetry silicon cell can have vanishing ionic forces while its volume is far from the equilibrium value.

3.3.2 Physical interpretation

At hydrostatic external pressure the target is enthalpy, H=E+P_ext V. Stress is related to the derivative with respect to strain, and its sign depends on the convention reported by the program. Read the declared tensor convention before converting it into a pressure. One useful independent quantity is the volume derivative P_EOS=-dE/dV, obtained from fixed-volume single points.

\[H=E+P_{\mathrm{ext}}V,\qquad P_{\mathrm{EOS}}=-\frac{dE}{dV},\qquad V=|\det A|.\]

The cell changes the PW basis and reciprocal grid; incomplete basis convergence can produce Pulay stress. Numerical atomic orbitals bring their own basis dependence and force/stress requirements. The lesson uses PW to avoid conflating a new orbital family with a change of lattice. A primitive two-atom Si cell may be allowed to change shape; to demand a cubic family, use only explicitly supported constraints and verify their compatibility instead of assuming symmetry will silently enforce your intention.

Scientific schematic: Cell vectors A; Normal and shear stress; Zero force, nonzero pressure; Basis stress check. No measured data.

Open figure at full size

Original course illustration; conceptual geometry and curves, not calculated results.

3.3.3 Worked input and file changes

# Precise delta to the converged first-pw-silicon INPUT.
suffix silicon_cell
calculation cell-relax
relax_method cg
relax_nmax 100
force_thr_ev 0.01
stress_thr 0.5
press1 0
press2 0
press3 0
cal_force 1
cal_stress 1
out_stru 1
scf_thr 1e-9

# Preserve verified Si UPF, accepted ecutwfc, nspin and bands.
# STRU: keep two Si atoms with movement masks m 1 1 1.
# KPT: keep the accepted Gamma-centered bulk mesh.

Use the complete STRU and KPT from first PW silicon, with their accepted cutoff and k-point tests. This block replaces matching keys. stress_thr and press1/press2/press3 are in kbar, so 0.5 kbar is 0.05 GPa; the forces here use eV/Angstrom through force_thr_ev. In version 3.9 relax_method is a string and fixed_axes shape or volume requires relax_new True. This introductory deck does not add those constraints. If you need fixed shape, construct a separately verified constrained model and compare it with the unrestricted result. Preserve fractional atom positions while initially scaling lattice vectors; STRU lattice units remain Bohr times dimensionless vectors.

3.3.4 Run and inspect the evidence

Create a fresh directory, record the initial determinant and cell lengths, and retain each output structure. Inspect OUT.silicon_cell/running_cell-relax.log for both ionic and cell iterations. Version 3.9's documented ionic snapshots use STRU_ION${istep}_D; relate the final evaluated tensor and energy to the correct structure rather than assuming a beta filename. Copy that geometry to a fresh scf calculation with cal_force 1 and cal_stress 1. First reproduce the final result with identical controls, then increase cutoff alone and mesh alone. Finally prepare small isotropic strains about the accepted cell and use the equation-of-state lesson to check the energy slope against the target pressure. Report the full cell matrix, not just a single lattice number.

3.3.5 Observable-specific convergence

A proposed acceptance rule is residual free-coordinate force below 0.01 eV/Angstrom and every relevant stress residual below 0.5 kbar in the independent final SCF. Tightening the basis should change the inferred lattice constant by less than your declared target, for example 0.002 Angstrom, and pressure by less than the stress budget. These are teaching targets, not experimental agreement claims. Inspect shear components too when shape is free. Test a second initial volume: convergence to the same basin is stronger evidence than one successful trajectory. If an increased cutoff changes pressure substantially, rerun the optimization at the improved basis rather than attaching the new stress to the old geometry as a success.

3.3.6 Acceptance worksheet and provenance

Write the three physical lattice vectors into a matrix and compute its determinant before and after optimization. Preserve their ordering. For the primitive diamond cell the conventional cubic parameter is not simply the length of a primitive vector; reconstruct it from the known lattice convention or report the full primitive matrix. This avoids an erroneous comparison with a conventional-cell experimental lattice constant.

Store all six independent stress components with the unit kbar, along with the target external pressure and the code's declared sign convention. Evaluate a small isotropic expansion and contraction to determine whether a positive reported pressure is consistent with minus the energy-volume slope. In a zero-pressure calculation this check is still valuable because an apparently vanishing trace can conceal nonzero shear. For unrestricted shape, inspect deviatoric components as well as hydrostatic pressure.

Accepted geometry / test Volume (Angstrom cubed) Max force (eV/Angstrom) Stress residual components (kbar)
Optimizer endpoint — — —
Fresh SCF, identical controls — — —
Higher cutoff / denser mesh separately — — —

Attach the final evaluated structure, its source-log step and the PP checksum. A change in cutoff is a basis-error comparison; a change in external pressure is a new physical condition and belongs in a separate table.

3.3.7 Pitfalls and limits

An unconverged cutoff can shift the equilibrium volume through basis stress. k-point dimensions fixed during a volume scan correspond to changing physical spacing; this must be monitored. Do not compare a primitive-cell energy with a conventional-cell energy without atom-count normalization. Do not let a slab vacuum dimension relax as if it were bulk. Do not copy VASP ISIF settings into INPUT. A pressure sign error can turn compression into expansion, so verify with a small energy-versus-volume perturbation before studying nonzero pressure.

3.3.8 Exercises with answer guidance

  1. Both Si forces vanish at an expanded cell but the pressure is nonzero. Is the structure optimized? Guidance: ionic equilibrium does not imply cell equilibrium; inspect the energy slope and stress.
  2. The final 60 Ry cell fails the independent 100 Ry stress test. Which geometry should be published? Guidance: none yet; choose a converged cutoff and repeat cell optimization, documenting the failed lower-basis check.

3.3.9 Versioned references

The university-authored guide provides teaching context; older pages can predate 3.9. Use the linked official version for exact syntax. This is original instructional synthesis, and reference outputs are not presented as results of this course.