abinit / abinit

The official github mirror of the Abinit repository. We welcome bug fixes and improvements. Note that most of the active developments are hosted on our https://gitlab.abinit.org/ server. Before embarking on making significant changes, please contact the Abinit group.

Home Page:https://www.abinit.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Berryopt not working with PAW + non-collinear spin

dbennett1994 opened this issue · comments

Hello,

I am trying to run calculations which have non-collinear spin and calculate the Berry phases. I get the following error:

--- !ERROR
src_file: m_berryphase_new.F90
src_line: 2999
mpi_rank: 0
message: |
    Found wrong number of k-points in IBZ

I am using an 8x8x1 k-mesh. Strangely, it runs for 1x1x1 and 2x2x1, but not higher. I have attached example input files here. For the spin, I use

nsppol 1
nspinor 2
nspden 4
kptopt 4

For berryopt, the only combination that works is

berryopt      -1
rfdir          1 1 1
symmorphi 0
occopt 1

Also, nproc has to be a divisor of nkpt. Anything else, and abinit will stop and give an error.

The calculations are somewhat involved: I'm using PAW datasets, and there is non-collinear spin, SOC and DFT+U. But I tried switching off SOC and U, and I still get the same error.

I tried running similar calculations using fully relativistic .psp8 pseudos from PseudoDojo, and the error doesn't occur.

The error is coming from 67_common/m_berryphase_new.F90, but I couldn't see anything obvious. My guess is that for kptopt 4, the berryphase routine is not finding the correct k-mesh.

I am using abinit-9.6.2, with gnu compilers + MPI, and libxc, xmlf90, libpsml, see config.log file attached.

nii2.in.txt
nii2.files.txt
config.log

After discussing with Eric Bousquet I tried running the calculations with kptopt 3 and they run without crashing! So it seems like the problem is with berryopt + kptopt 4 + PAW.

From the documentation on kptopt 4:

This has to be used when performing calculations with non-collinear magnetism allowed (nspden = 4)

I think it should be that kptopt 4 has to be used over 1 and 2, since both of those enforce time-reversal symmetry. But it should be possible (although maybe not always a good idea) to use kptopt 3 in any situation, right?

Also, the calculations do not crash with kptopt 4 when using norm-conserving (.psp8) pseudopotentials, so the problem seems to be specific to PAW datasets.

Daniel Bennett