pyscf: Periodic calculation of diamond C-vacancy with GDF fails in 2.0.0 vs 1.7.x

I am running a calculation of a 222 tiling of the primitive diamond supercell with a carbon vacancy. This calculation successfully completes with pyscf 1.7.x but now fails in 2.0.0. I believe the problem stems from this issue: https://github.com/pyscf/pyscf/issues/843 where changes to GDF were made based upon the discrepancy between supercells built by hand and pyscf’s tools.

In pyscf 2.0.0, GDF outputs a new error message that it did not in pyscf 1.7.x: DF metric linear dependency for kpt 0 cond = -1.704e+04, drop 143 bfns Which is triggered at this line: https://github.com/pyscf/pyscf/blob/master/pyscf/pbc/df/df.py#L218

Additionally, a colleague has found that using gth-szv or gth-dzv (rather than gth-dzvp in the MWE) or FFTDF will converge the SCF calculation.

This error is also present in a pristine supercell, i.e. without the C-vacancy. I have attached a MWE example that demonstrates this error, as well as the output. In both cases the initial energy is reasonable but immediately diverges on cycle 1.

MWE-diamond_GR1.txt 1026174_00-diamond_GR1.txt 1026178_00-diamond_pristine.txt

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (12 by maintainers)

Most upvoted comments

Hi fish, majo,

We (tberkel and jamesETsmith) now think the problem is libcint / qcint, where the latest version of qcint is what causes the problem (with dzvp, but not dzv), but not libcint. We don’t know which version of qcint specifically, presumably between Dec 2020 and now. James notes that the previous version of qcint is not compatible with pyscf 2.0.0a

Yes, this might definitely arise from the same problem as #1018 i.e. wrong integrals from qcint.

Unfortunately, it appears that libcint and qcint don’t have unit tests… Do any of the test builders use qcint?

To confirm it’s not a problem with my input file, you can run the example:

https://github.com/pyscf/pyscf/blob/master/examples/pbc/35-gaussian_density_fit.py

With the basis set to gth-dzvp, and it will fail. It successfully completes with 1.7.x.

Interesting, do you also have the 1.7.x output, of the converging calculation? Just to double check: You do not use exp_to_discard here, are you sure you didn’t use it in the converging 1.7 calculations?

The linear dependency message is not necessarily an error - it just means that the auxiliary basis for the coulomb metric is overcomplete and some functions have to be removed; it is however weird that this message is only present in 2.0 and not 1.7, when you use the same input.