[CP2K-user] [CP2K:22446] GAPW_XC + r2SCAN: analytic forces and stress disagree with finite differences (CP2K 2026.2)

liu wei whisper256136 at gmail.com
Sat Oct 17 09:39:09 UTC 2026


Dear CP2K developers and users,

While testing METHOD GAPW_XC with r2SCAN in CP2K 2026.2 (git:c92cc08), I 
found that the analytic forces and stress
do not agree with RUN_TYPE DEBUG finite differences, whereas GAPW, and 
GAPW_XC with PBE, pass the same check. I may
be missing something in my setup, so I would be grateful if you could take 
a look. All inputs and outputs, a short
analysis script (numpy only) and a README with the full tables are attached 
(cp2k_GAPW_XC_mGGA_report.zip).

**Setup**

302-atom ZnO–P2O5–Al2O3 glass (cubic, a = 16.06 Å, Γ point), 
TZVP-MOLOPT-SCAN-GTH + GTH-SCAN for all elements,
`MGGA_X_R2SCAN` + `MGGA_C_R2SCAN` (libxc) + D3(BJ), CUTOFF 1100 / 
REL_CUTOFF 60, EPS_SCF 1e-7, analytical stress.
RUN_TYPE DEBUG checks one Al, O, P and Zn atom and the stress tensor. 
Between the inputs, only METHOD,
GAPW_ACCURATE_XCINT, FORCE_PAW or the functional changes. Without 
FORCE_PAW, O and Zn are PAW kinds and Al and P are
treated by GPW.

**Results** (analytic − finite difference; force: max over x, y, z, meV/Å; 
stress: GPa)

| functional | METHOD | ACCURATE_XCINT | Al | O | P | Zn | ΔS diagonal | ΔS 
off-diagonal |
|---|---|---|---|---|---|---|---|---|
| r2SCAN | GAPW | T | 0.02 | 0.03 | 0.23 | 0.03 | 0.004 | 0.001 |
| r2SCAN | GAPW | F | 0.02 | 0.03 | 0.23 | 0.04 | 0.004 | 0.001 |
| r2SCAN | **GAPW_XC** | T | 11.5 | 91.5 | 23.3 | **410** | **+23.7** | 
0.008 |
| r2SCAN | **GAPW_XC** | F | 18.2 | 261 | 37.6 | **458** | **+28.8** | 
0.004 |
| PBE | GAPW_XC | T | 0.03 | 0.01 | 0.23 | 0.00 | 0.005 | 0.001 |
| PBE | GAPW_XC | F | 0.02 | 0.01 | 0.23 | 0.00 | 0.004 | 0.001 |

- The checked forces are 2000–3600 meV/Å, so the Zn error is about 20 %. 
The stress error is an isotropic shift
  of the diagonal; the off-diagonal components agree.
- The *finite-difference* forces of GAPW_XC and GAPW agree to within 2.6 
meV/Å (with and without
  ACCURATE_XCINT), so the GAPW_XC energy itself looks fine; only the 
analytic derivatives seem to be affected.
- The largest errors are on the PAW kinds (Zn, then O). Adding `FORCE_PAW` 
(so Al and P also become PAW atoms)
  does not change the numbers.
- So the problem seems specific to the combination GAPW_XC + meta-GGA, and 
does not depend on
  GAPW_ACCURATE_XCINT.

In the v2026.2 regtests, the GAPW_XC finite-difference checks 
(`regtest-acc-1/h2o-gapw_xc-force-1.inp`,
`h2o-gapw_xc-stress-debug-1.inp`) use PBE, and the meta-GGA (TPSS) checks 
use GAPW with USE_FINER_GRID, so I could
not find a test that covers this combination. I have not tested the current 
master, other meta-GGAs or a smaller
system.

My questions:

1. Is this a known issue, or is GAPW_XC not meant to be used with meta-GGA 
forces and stress?
2. If it is a bug, would a small reproducer help (for example H2O with 
TPSS, based on `h2o-gapw_xc-force-1.inp`)?
   I would be happy to prepare one, or to open a GitHub issue.

For now I use GAPW (or GPW with USE_FINER_GRID), which pass the same checks.

Thank you very much for your time and for CP2K.

Best regards,
Wei LIU

-- 
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cp2k/c6c055e8-358f-426b-b287-dd02f4d2399an%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20261017/4249f856/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cp2k_GAPW_XC_mGGA_report.zip
Type: application/x-zip
Size: 774465 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20261017/4249f856/attachment-0001.bin>


More information about the CP2K-user mailing list