Comparing SCAN0 (and other functionals) to other codes

I have tried to use SCAN0 in psi4, since it’s in the new libXC, but am getting somewhat different answers than Q-Chem… it looks like I’m off in the 3rd decimal place. I then tried PBE0 and found I’m off in the 5th decimal place… which still seems kind of high. I was wondering what the cause of these discrepancies could be?

Here’s one of my scan0 inputs:

molecule mol{
0 1
O 0.0 0.0 0.0
H 1.0 0.0 0.0
H 0.0 1.0 0.0
}

set {
basis 6-31G
scf_type direct
dft_spherical_points 590
dft_radial_points 99
}

testscan0 = {
“name”: “my_SCAN0”,
“x_functionals”: {“MGGA_X_SCAN”: {“alpha”: 0.75}},
“x_hf”: {“alpha”: 0.25},
“c_functionals”: {“MGGA_C_SCAN”: {}}
}

energy(‘scf’, dft_functional=testscan0)

For comparison, what’s your Q-Chem input, and what version of Psi4 are you using? 1.1, one of our release candidates, something else…?

Looks like you’re using a non-standard integration grid. Are you specifying that same grid in your Q-Chem inputs? The $rem block specification should look like

XC_GRID     000099000590

to request the (99, 590) grid you’ve used in the Psi4 input provided. Although, since Psi4 doesn’t prune the grids while Q-Chem does, it’s unlikely that you can compare more closely than around 10^-6 anyways.

This was psi4 1.2 downloaded from github master branch ~1 month ago. I played around with the grids in Q-Chem and Psi4 assuming that that was likely the source of error, but this didn’t really fix it. Q-Chem uses the pruned SG grids by default but I tried using the unpruned grids in my comparison (see below). I also noticed grid convergence is slow in both codes… I’m not sure how concerned I should be, but off in the 3rd decimal place seems scary.

Q-Chem input:

$molecule
0 1
O 0.0 0.0 0.0
H 1.0 0.0 0.0
H 0.0 1.0 0.0
$end

$rem
JOBTYPE SP
METHOD SCAN0
BASIS 6-31G
SCF_CONVERGENCE 10
THRESH 14
xc_grid 000099000590
nl_grid 000099000590
SYMMETRY FALSE
SYM_IGNORE TRUE
$end

Third decimal place seems very high. Typically we see errors in the 5th decimal or so (this seemed high to me, but is somewhat typical). One note is that absolute energies are hard to compare while relative are much cleaner. We use a water interaction energy test case and a ionization energy to compare between codes. Dom may be able to point you in the right direction.

SCAN is ridiculously sensitive to the grid. 99 radial points is way too little. Try the calculation with 500 radial grid points, then you should get microhartree level agreement for absolute energies.

Relative energies may possibly be reproducible with fewer radial points.

Running with input

I get the energies

so you actually need over 600 radial points to get the converged value, and god knows how many angular points…

The reason why the results disagree between codes is that the radial grids are slightly different, so the only way to get a reasonable comparison is to do it at the radial grid limit. The angular grid doesn’t matter if both codes use Lebedev grids.

Doesn’t Q-Chem prune their grids, however? So, even at the grid limits, Psi4 and Q-Chem wouldn’t quite match…

It is quite a sad issue, since SCAN/SCAN-D3 is otherwise really good. Turbomole e.g. explicitly recommends a very high value for the radial grid to get stable gradients for weakly bound complexes (effectively something like 300-400 radial points for lighter elements).

no special sensitivity for the axial grid (beyond being a meta-GGA)

By default, Q-Chem does use pruned grids (SG-0, SG-1, SG-2, and SG-3), but if you specify the grid by hand then it’s unpruned…

1 Like

OK so it’s a bit better than I thought. You can get microhartree accuracy in this case with 200-300 radial points and 590 angular points.

For reference, this is what I get trying to converge the grid by the same scheme with Psi4:

(100,590): -76.3296318040538040
(200,590): -76.3294369780156643
(300,590): -76.3294292717187233
(400,590): -76.3294288123199891
(500,590): -76.3294286597882632
(600,590): -76.3294286485924260
(700,590): -76.3294286385947203
(700,770): -76.3294286553314123
(700,974): -76.3294284105253240
(700,1202): -76.3294267656620349
(700,1454): -76.3294274083709752
(700,1730): -76.3294276815653632

They’re converging to different values but I think they’re close enough not to be concerned.

1 Like