Is 'getden' working properly?  [SOLVED]

Total energy, geometry optimization, DFT+U, spin....

Moderator: bguster

Locked
cgs12
Posts: 16
Joined: Thu Apr 27, 2017 6:27 pm

Is 'getden' working properly?

Post by cgs12 » Tue Sep 25, 2018 1:11 am

Dear all,

I am trying to use the variable 'getden' such that the electronic density obtained from the converged SCF calculation of dataset 1 is used as an initial guess of SCF for dataset 2. Both datasets deal with the same electronic structure calculations. I would expect the energy in dataset 2 should be almost the same as the converged value even in the first few iterations. However this is not the case.

I repeat the same thing for dataset 3 except that instead of using density as input, we use wavefunction as input using 'getwfk', and this works well since the energy computed in the first iteration is close enough to the converged value.

I have attached the input and output file for your reference.

Thanks so much for your attention.
Attachments
mg4c.in
Input file
(1.27 KiB) Downloaded 226 times
mg.out
Output file
(103.8 KiB) Downloaded 211 times

User avatar
gmatteo
Posts: 291
Joined: Sun Aug 16, 2009 5:40 pm

Re: Is 'getden' working properly?  [SOLVED]

Post by gmatteo » Tue Sep 25, 2018 1:27 am

I would expect the energy in dataset 2 should be almost the same as the converged value even in the first few iterations. However this is not the case.


As expected...
The initial Hamiltonian is built with the previous (converged) density but the **wavefunctions** are initialized with
random numbers. The eigensolver will start the minimization from these random wavefunctions , compute a new set of trial eigenstates
and recompute the density from these wfs.
So the density at iteration 1 will be significantly different from the starting point and you need to iterate to find the (same) self-consistent solution.

Restarting from well-converged wfs will give you results at the first iteration that are very close to dataset 1.
From the wfs, the code will recompute the DEN, and initialize the eigensolver with KS states and energies
that are already solution of the KS equations.

Restarting from WFK is much better than restarting from a DEN file (the same holds also for DFPT).
The drawback is that WFK files occupy much more disk space that DEN files.

cgs12
Posts: 16
Joined: Thu Apr 27, 2017 6:27 pm

Re: Is 'getden' working properly?

Post by cgs12 » Tue Sep 25, 2018 11:30 pm

Thanks so much for your reply.

Locked