[CP2K-user] Constrained DFT (CDFT) Errors

Nico Holmberg holmbe... at gmail.com
Wed Oct 31 06:35:13 UTC 2018


The first error is harmless. When you compute CDFT charges, the atomic 
weight functions for each atom are stored as separate grids. This warning 
merely states that your simulation allocated (and later released) more of 
these grids from the grid pool than the hardcoded "limit". I don't know the 
history behind this choice, but I would say that its safe to ignore this 
warning. The last error is also harmless: you're using diagonalization with 
orbital occupation smearing, which cannot be used to compute the spin 
contamination metric S**2.

The 2nd-4th errors are more serious. These are related to the use of 
Diagonalization + orbital smearing. As I mentioned in my previous post, the 
CDFT coupling is well-defined only when computed between states with the 
same total number of electrons. This also applies to spins: the states 
should be in the same spin state, i.e., the number of alpha/beta electrons 
should be the same in both states. These errors indicate that the number of 
alpha/beta electrons is not the same in both states, which are computed as 
the sum of orbital occupations (you can print these if you want to check 
for yourself). If you want to keep using diagonalization, you need to 
ensure that the calculation preserves the number of alpha/beta electrons. 
You can use the keyword FIXED_MAGNETIC_MOMENT 
<https://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/SCF/SMEAR.html#FIXED_MAGNETIC_MOMENT> to 
fix the number spin electrons. I encourage you to test this keyword first 
without CDFT. 

You also have another choice if the difference between the number of 
alpha/beta electrons is small (ideally <0.1). The CDFT calculation 
considers all MOs with occupation larger than EPS_OCCUPIED 
<https://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/MIXED/MIXED_CDFT.html#EPS_OCCUPIED> as 
occupied orbitals (default value 1e-6). It's possible that you could remove 
some of the fractionally occupied orbitals by increasing EPS_OCCUPIED, 
which could then ensure that both states are in the same spin state. In my 
experience, fractionally occupied orbitals can exhibit linear dependencies 
causing the coupling to vanish. You can use a singular value decomposition 
(keyword EPS_SVD 
<https://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/MIXED/MIXED_CDFT.html#EPS_SVD> ) 
to screen linearly-dependent MOs by setting EPS_SVD to some small value 
e.g. 1e-3. In this case, only those MO pais whose singular value is above 
1e-3 is included in the CDFT calculation. You can use the print keyword 
to see which MO pairs get eliminated if you vary EPS_SVD.

As you can see using diagonalization with CDFT can be quite complex. If 
possible I would recommend switching to OT.

- Nico

keskiviikko 24. lokakuuta 2018 22.52.10 UTC+3 Brian Day kirjoitti:
> Hi Nico,
> Thanks for your reply.
> I was able to get the calculation running by decreasing the box size (I 
> did not initially realize that the memory scaled that quickly with box 
> size, I thought it was mostly impacted by number of atoms). I do get some 
> warnings though, which I was hoping you might be able to explain.
> When running the CDFT calculation for one of the states, I get the 
> following:
>  *** WARNING in pw/pw_pool_types.F:470 :: hit max_cache ***
> When I try to run a calulcation for the electronic coupling integral, I 
> get the following set or errors:
>  *** WARNING in mixed_cdft_methods.F:1192 :: The usage of SVD based matrix 
> ***
>  *** inversions with fractionally occupied orbitals is strongly            
> ***
>  *** recommended to screen nearly orthogonal states.                      
>  ***
>  *** WARNING in mixed_cdft_methods.F:1241 :: The number of alpha electrons 
> ***
>  *** is not constant across all CDFT states. Calculation proceeds but the  
> ***
>  *** results will likely be meaningless.                                  
>  ***
>  *** WARNING in mixed_cdft_methods.F:1245 :: The number of beta electrons 
> ***
>  *** is not constant across all CDFT states. Calculation proceeds but the 
> ***
>  *** results will likely be meaningless.                                  
> ***
> Lastly, this is an error I have gotten with almost all of my charged state 
> calculations that I do not know how to handle:
> WARNING: S**2 computation does not yet treat fractional occupied orbitals
> The files from the CDFT calculation set can be found here: 
> https://drive.google.com/open?id=1k3D-cNtOUmJSxW4lzVrC_d7Zu9uTtn_O (Also, 
> I just noticed that I didn't call the restart files correctly, so I will be 
> fixing that and repeating the run, in case that is the cause of any of the 
> above issues).
> Thanks again!
> -Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20181030/ef184b9b/attachment.htm>

More information about the CP2K-user mailing list