Expand documentation on MD and opt; add "Foreword and FAQ" (#5337)

This commit is contained in:
HE Zilong 2026-06-07 19:35:41 +08:00 committed by GitHub
parent 5f41a9ca5d
commit b4b5edf373
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 368 additions and 48 deletions

View file

@ -37,7 +37,7 @@ relaxed in-plane lattice constants, and structures prepared for fixed-cell molec
```{note}
An optimization is not a replacement for finite-temperature pressure sampling; if the desired
quantity is a thermal average at finite temperature, use a molecular-dynamics workflow with
appropriate ensemble instead.
appropriate ensemble instead. For more on this topic, see [](../sampling/molecular_dynamics).
For the usual electronic-structure methods based on the Born-Oppenheimer approximation
(which, by neglecting nuclear motion, provides the concept of "potential-energy surface"
@ -146,7 +146,12 @@ vaporized or molten conditions with lots of broken chemical bonds.
For `CELL_OPT`, the initial cell matters as much as the initial coordinates. The starting volume and
shape should be close enough to the expected structure and density, such that the pressure and
stress are not dominated by preparation artefacts.
stress are not dominated by preparation artefacts. The directions where the cell is relaxed are
dependent of the external pressure. For surface slabs, two- or one-dimensional materials, or systems
with vacuum, the anisotropic nature means that the vacuum direction is not to be relaxed unless
physically intended; it is better to constrain the appropriate cell components or use a fixed-cell
optimization after choosing the desired cell. A rigorous test for the convergence of target
properties with respect to different size of vacuum may be necessary.
A visualization of the structure and cell in modelling programs, with the box and the neighboring
periodic images displayed, will be very helpful; neither large vacuous gaps nor crowded cluster of
@ -154,33 +159,11 @@ atoms should occur near the boundary of the box on the directions consistent wit
and conversely, sufficient vacuum space on the non-periodic directions is crucial for eliminating
unwanted interactions across the boundary.
For surface slabs, two- or one-dimensional materials, or systems with vacuum, do not relax the
vacuum direction unless physically intended; it is better to constrain the appropriate cell
components or use a fixed-cell optimization after choosing the desired cell.
```{warning}
**Do not use experimental structure blindly.**
If available, **computational** materials databases are the most recommended avenue
to obtain structures that are "computation-ready", or even better, already optimized
with some electronic-structure methods. On the other hand, structures that are from
**experimental** characterization are frequently not "computation-ready", and thus
should not be subject to optimization without careful validation in pre-processing.
This can be prominent for `cif` and `pdb` structures determined by powder or single-
crystal XRD which can be affected by sample quality and thermal motion.
- Watch out for crystallographic disorder and atoms with low resolution or fractional
occupation: using the superposition of all atoms as if every occupancy is 1.00 is
highly likely to introduce contacting or even overlapping atoms.
- Beware of composition: the atomic structure may not match the intended macroscopic,
charge-neutral chemical formula, owing to missing or duplicated hydrogen atoms,
small counter ions, solvent or ligand molecules.
Possible resolutions vary from simple manual editing in the modelling stage, to
utilization of supercells and enumeration of special quasirandom structures (common
for materials with dopants), and to more rigorous XRD refinement and application of
quantum crystallography methods.
```
As a reserved extreme measure, the [MAX_FORCE](#CP2K_INPUT.FORCE_EVAL.RESCALE_FORCES.MAX_FORCE)
keyword triggers a mechanism where very large forces on atoms are artificially rescaled in
magnitude. This setting is only meant for crude initial structure; once the geometry becomes more
reasonable and the forces are closer to the convergence criteria, it shall not be used in the
production run towards the final result.
```{note}
For variable-cell optimizations, the [CELL_OPT](#CP2K_INPUT.MOTION.CELL_OPT) section
@ -407,7 +390,7 @@ and linked to the CP2K build in order to detect and preserve the space group. Us
Density functional theory (DFT) is an electronic-structure (wavefunction) method routinely used for
optimization. This section elaborate on the relevant aspects, assuming basic knowledge about the
method which can be found at [](../dft/index.md).
method which can be found at [](../dft/index).
### SCF quality