Full electron calculation for electron-positron annihilation

Hello all,

I’m trying to do an electron-positron annihilation calculation and want to compare the effect of different completeness of PAW sets. I use ATOMPAW to generate PAW sets with different valence/core electron definitions, the calculation can be completed normally in most cases.

The problem is that the core wavefunction file atomName.corewf.xml seems to be a must for ABINIT to perform such a calculation. But if I generate a PAW set with all electrons being valence, ABINIT will report an error like:

At line 2139 of file ../../../src/67_common/m_positron.F90
Fortran runtime error: Attempt to DEALLOCATE unallocated 'energycor'

Error termination. Backtrace:
#0  0x7fab3b8b32ed in ???
#1  0x7fab3b8b3ed5 in ???
#2  0x7fab3b8b42a7 in ???
#3  0x556690cb4a2f in __m_positron_MOD_posdoppler
	at ../../../src/67_common/m_positron.F90:2139
#4  0x55668fe9912e in __m_outscfcv_MOD_outscfcv
	at ../../../src/94_scfcv/m_outscfcv.F90:1284
#5  0x55668fe7d394 in __m_scfcv_core_MOD_scfcv_core
	at ../../../src/94_scfcv/m_scfcv_core.F90:2229
#6  0x55668fe6917b in scfcv_scfcv
	at ../../../src/94_scfcv/m_scfcv.F90:713
#7  0x55668fe4e9c1 in __m_gstate_MOD_gstate
	at ../../../src/95_drive/m_gstate.F90:1380
#8  0x55668fca8756 in __m_gstateimg_MOD_gstateimg
	at ../../../src/95_drive/m_gstateimg.F90:565
#9  0x55668fc8b30c in __m_driver_MOD_driver
	at ../../../src/95_drive/m_driver.F90:783
#10  0x55668fc726f2 in abinit
	at ../../../src/98_main/abinit.F90:396
#11  0x55668fc77f1a in main
	at ../../../src/98_main/abinit.F90:88

and abort the job.

I took a brief look at m_positron.F90 and its associated dependencies, and it looks like it’s because rdpawpsxml_core in m_pawxmlps is trying to read something from the core wavefunction file to act as that energycor, but when all the electrons are valence, the core wavefunction file is missing that part.

Should I manually add something to the core wavefunction file, or modify these modules to let them ignore something? Or is the problem elsewhere, e.g. that this practice itself (no core electrons in the PAW set) is discouraged?


Dear Li Jian,

As a matter of fact the code was certainly not designed for this somewhat extreme use (all electrons pseudopotential).
A priori, after reading the corewf file, the nphicor variable contains the value zero.
So, first, in the m_positron.F90 file, you can replace the following lines:


by :

       if (nphicor(itypat)>0) then
       end if

But that doesn’t guarantee that the code won’t crash later…
Marc Torrent

Much thanks! It did work for this specific case of mine, and so far there seem to be no other problems in this build.

1 Like