Full charge density cube is zero everywhere

23 views
Skip to first unread message

hfruchtl

unread,
Oct 6, 2025, 1:06:31 PM (7 days ago) Oct 6
to cp2k
Folks,
I have a 2-dimensionally periodic system and want to create a cube file for Bader analysis (with the Henkelman program). I am using the TOTAL_HARD_APPROX keyword to take care of the core charges. But the cube file I get contains no charges. The first lines are:

-Quickstep-
ELECTRON DENSITY
  217    0.000000    0.000000    0.000000
  122    0.234963    0.000000    0.000000
  108    0.000000   -0.228920    0.000000
  200    0.000000    0.000000    0.236216
    8    0.000000   21.546059  -14.495211   21.850861
    1    0.000000   22.840666  -13.745938   23.284968
    6    0.000000    2.379002   -6.501607   19.060353
...

and when it comes to the values on the grid after the atom information, all vales are zero. Am I doing something wrong, or does this not work for periodic systems? I attach the input file for a smallish model system. The version number is CP2K version 2025.1.

Thanks in advance,

  Herbert
bader.inp

Jürg Hutter

unread,
Oct 10, 2025, 5:01:21 AM (4 days ago) Oct 10
to cp...@googlegroups.com
Hi

I see you are doing a GPW calculation. The DENSITY_INCLUDE keyword only applies to GAPW calculations.
see
DENSITY_INCLUDE: enum= TOTAL_HARD_APPROX

Which parts of the density to include. In GAPW the electronic density is divided into a hard and a soft component, and the default (TOTAL_HARD_APPROX) is to approximate the hard density as a spherical gaussian and to print the smooth density accurately. This avoids potential artefacts originating from the hard density. If the TOTAL_DENSITY keyword is used the hard density will be computed more accurately but may introduce non-physical features. The SOFT_DENSITY keyword will lead to only the soft density being printed. In GPW these options have no effect and the cube file will only contain the valence electron density.

If you want to have all electron densities, you need to do GAPW with POTENTIAL ALL.

regards
JH

________________________________________
From: cp...@googlegroups.com <cp...@googlegroups.com> on behalf of hfruchtl <hfru...@gmail.com>
Sent: Monday, October 6, 2025 7:06 PM
To: cp2k
Subject: [CP2K:21881] Full charge density cube is zero everywhere
--
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+uns...@googlegroups.com<mailto:cp2k+uns...@googlegroups.com>.
To view this discussion visit https://groups.google.com/d/msgid/cp2k/dfaf463e-5f7a-46d5-ba50-5e3cc22b424fn%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/dfaf463e-5f7a-46d5-ba50-5e3cc22b424fn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Léon Luntadila Lufungula

unread,
Oct 10, 2025, 5:48:03 AM (4 days ago) Oct 10
to cp2k
Dear Prof. Hutter,

I was wondering if you always need to do an all-electron calculation to reproduce the all-electron density or if you could reconstruct the all-electron density from a pseudopotential calculation using GAPW? I ask this because I used to use Quantum ESPRESSO and there you could use PAW pseudopotentials during your calculation and reconstruct the all-electron density through the projector functions, so I am wondering if this is also possible in CP2K when using the GAPW method (which is based on the PAW method) with pseudopotentials?

Thanks in advance,
Léon

Jürg Hutter

unread,
Oct 10, 2025, 6:12:06 AM (4 days ago) Oct 10
to cp...@googlegroups.com
Hi

the core density is not available in pseudopotential calculations (GPW and GAPW).

regards
JH

________________________________________
From: cp...@googlegroups.com <cp...@googlegroups.com> on behalf of Léon Luntadila Lufungula <Leon.luntad...@uantwerpen.be>
Sent: Friday, October 10, 2025 11:48 AM
To: cp2k
Subject: Re: [CP2K:21888] Full charge density cube is zero everywhere
To view this discussion visit https://groups.google.com/d/msgid/cp2k/98b9b314-13e2-4c62-bb4e-5a96aa5d9963n%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/98b9b314-13e2-4c62-bb4e-5a96aa5d9963n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Léon Luntadila Lufungula

unread,
Oct 10, 2025, 8:04:35 AM (3 days ago) Oct 10
to cp2k
Hi,

Thanks for the clarification. 

Maybe I have one more follow-up question if you would allow it. If you want to improve the quality of the electron density cube file you are writing for a QTAIM calculation, which of the following should you focus on?
1) Increasing CUTOFF in MGRID section
2) Increasing STRIDE in E_DENSITY_CUBE
3) Reducing electron count further by changing the parameters in QS or KIND section

Kind regards,
Léon
Reply all
Reply to author
Forward
0 new messages