Restarting from the same WFN didn't got the same energy

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

Moderator: bguster

Locked
Vladimir
Posts: 13
Joined: Sun Jun 05, 2016 5:22 am

Restarting from the same WFN didn't got the same energy

Post by Vladimir » Tue Jul 19, 2016 6:54 am

I'm in trouble to optimize geometry of AgN3 (silver azide).

Using different PP (LDA FHI, GGA FHI, HGH NC, GGA PBE) I optimized the geometry with (optcell=1 or optcell=2), but when I restart optimization from optimized acell and WFN (with irdwfk 1 keyword) I've got different energy from previously optimized ( higher one) and optimization process continued again to the previously optimized geometry.

graph demonstrate relationship between the x-dim of AgN3 unit cell and iteration number for first and second run.

the PP http://www.abinit.org/downloads/psp-links/lda_fhi

the input:

Code: Select all

# AgN3 : geometry optimization
#

# Definition of the unit cell
acell  5.600 5.980 5.998 angstrom
spgroup 72
rprim  1.0  0.0  0.0
       0.0  1.0  0.0
       0.0  0.0  1.0
chkprim 0

# Definition of the atom types
ntypat 2
znucl  7 47

# Definition of the atoms
natom 16           # There are 16 atoms
typat 4*2 12*1
xred              # This keyword indicate that the location of the atoms
                  # will follow, one triplet of number for each atom
   0.0  0.0  1/4  # Note the use of fractions (remember the limited.
   1/2  1/2  1/4  # interpreter capabilities of ABINIT)
   0.0  0.0  3/4  # Note the use of fractions (remember the limited.
   1/2  1/2  3/4  # interpreter capabilities of ABINIT)
   0.3422   0.1327   0.0  # 1-st N3 group (N1)
   1/2      0.0      0.0  # 1-st N3 group (N2)
   0.6578  -0.1327   0.0  # 1-st N3 group (N3)
   0.1578   0.6327   0.0  # 2-nd N3 group (N1)
   0.0      1/2      0.0  # 2-nd N3 group (N2)
  -0.1578   0.3663   0.0  # 2-nd N3 group (N3)
   0.1578   0.3663   1/2  # 3-rd N3 group (N1)
   0.0      1/2      1/2  # 3-rd N3 group (N2)
  -0.1578   0.6327   1/2  # 3-rd N3 group (N3)
   0.6578   0.1327   1/2  # 4-th N3 group (N1)
   1/2      0.0      1/2  # 4-th N3 group (N2)
   0.3422  -0.1327   1/2  # 4-th N3 group (N3)

# Definition of the planewave basis set
ecut 20.0         # Maximal kinetic energy cut-off, in Hartree

# Definition of the k-point grid
kptopt 1          # Option for the automatic generation of k points, taking
                  # into account the symmetry
ngkpt 1 1 1       # This is a 1x1x1 grid based on the primitive vectors
nshiftk 1         # of the reciprocal space (that form a BCC lattice !),
                  # repeated four times, with different shifts :
shiftk 0.0 0.0 0.0
                  # In cartesian coordinates, this grid is simple cubic, and
                  # actually corresponds to the
                  # so-called 4x4x4 Monkhorst-Pack grid

# Definition of the SCF procedure
nstep 30          # Maximal number of SCF cycles
toldfe 1.0d-10    # Will stop when, twice in a row, the difference.
                  # between two consecutive evaluations of total energy.
                  # differ by less than toldfe (in Hartree).
diemac 3.0        # Although this is not mandatory, it is worth to
                  # precondition the SCF cycle. The model dielectric
                  # function used as the standard preconditioner
                  # is described in the "dielng" input variable section.
prtden 0          # No output of electron density

# add to conserve old < 6.7.2 behavior for calculating forces at each SCF step
# optforces 1
optcell 1
ntime   30
dilatmx 1.2
ecutsm  0.5
ionmov  2

how to avoid this behavior?
Best.
Vladimir.
Attachments
AgN3.png
AgN3.png (5.96 KiB) Viewed 5055 times
Last edited by Vladimir on Tue Jul 19, 2016 10:48 am, edited 2 times in total.

Jordan
Posts: 282
Joined: Tue May 07, 2013 9:47 am

Re: Restarting from the same WFN didn't got the same energy

Post by Jordan » Tue Jul 19, 2016 9:10 am

If you restart form the wave functions only, you don't restart from the optimized geometry.
To do so, you have to copy the last geometry (positions and lattice parameters) and paste it in you input file.

If you have abinit with netcdf, you should have a _HIST.nc file that contains all the steps. Using restartxf -1 or -2 would restart the full optimization from the lowest energy geometry or the last step.

Cheers

Vladimir
Posts: 13
Joined: Sun Jun 05, 2016 5:22 am

Re: Restarting from the same WFN didn't got the same energy

Post by Vladimir » Tue Jul 19, 2016 10:49 am

I'am restarting from optimized geometry and WFN, the graph demonstrate it.

Jordan
Posts: 282
Joined: Tue May 07, 2013 9:47 am

Re: Restarting from the same WFN didn't got the same energy

Post by Jordan » Mon Jul 25, 2016 9:02 am

Hi,

Ok sorry,

Could you check that in your first run, your fft grids (ngfft) at the end of the first run and at the beginning of the second are the same ?
If not, add the corresponding first ngfft in your second run.
Also, I see that you converge the energy (toldfe), you should try to converge the density (tolvrs) instead (or at least check that it is well converged).
what is you criteria for the relaxation ? I can't find tolmxf in your input file.

Cheers

Jordan

PS:Writing Hello and thanks has never burnt any keyboard ;)

Vladimir
Posts: 13
Joined: Sun Jun 05, 2016 5:22 am

Re: Restarting from the same WFN didn't got the same energy

Post by Vladimir » Tue Jul 26, 2016 8:39 am

Hello Jordan.

Thanks for the advice.

1. criteria for the relaxation is default tolmxf= 5.0000E-05
2. ngfft is 90 90 90 and ngfftdg is 120 125 125 in both run.

I think that I have faced a bad SCF convergence.
In both cases at first, we find a false SCF minimum, and then the real one.

Whether it is possible in this case affect the SCF convergence?

Best, Vladimir.

Vladimir
Posts: 13
Joined: Sun Jun 05, 2016 5:22 am

Re: Restarting from the same WFN didn't got the same energy

Post by Vladimir » Thu Jul 28, 2016 9:35 am

To start with a new geometry is necessary not only to copy new acell but also new xred.

thanks to Jordan for helpful discussions

how to add [SOLVED] to the subj?

Locked