[Pw_forum] Problem with bfgs relaxation

Serge Nakhmanson nakhmans at physics.rutgers.edu
Thu Nov 18 22:29:41 CET 2004


Dear All,

I am trying to relax a small (BaTiO_3)_1/(CaTiO_3)_1 superlattice with new
bfgs routine (PWscf in ESPRESSO 2.1). However, the routine seems to completely
ignore the force convergence threshold (forc_conv_thr) in my input file and
claims that it has converged even when forces in the system are large.

Here is my input file:

**********************************

  &CONTROL
                        title = '(BaTiO_3)_1/(CaTiO_3)_1 superlattice' ,
                  calculation = 'relax' ,
                 restart_mode = 'from_scratch' ,
                       outdir = './',
                   pseudo_dir = '/home/nakhmans/Codes/PWSCF/PSP/Ultrasoft/USPP_UPF/' ,
                       prefix = 'B1C1.c_fit' ,
                    verbosity = 'high',
                      tstress = .true.,
                        nstep = 100,
                etot_conv_thr = 5.e-5,
                forc_conv_thr = 4.e-5,
  /
  &SYSTEM
                        ibrav = 6,
                    celldm(1) = 7.29064,
                    celldm(3) = 2.00,
                          nat = 10,
                         ntyp = 4,
                      ecutwfc = 25,
                      ecutrho = 225,
  /
  &ELECTRONS
                     conv_thr = 1.e-8 ,
                  startingpot = 'atomic' ,
                  startingwfc = 'atomic' ,
                  mixing_mode = 'plain' ,
                  mixing_beta = 0.7 ,
  /

  &IONS
                 ion_dynamics = 'bfgs',
  /
ATOMIC_SPECIES
    Ba  137.32700  056-Ba-ca-sp-vgrp.uspp.UPF
    Ca   40.07800  020-Ca-ca-sp-vgrp.uspp.UPF
    Ti   47.86700  022-Ti-ca-sp-vgrp.uspp.UPF
     O   16.00000  008-O-ca--vgrp.uspp.UPF
ATOMIC_POSITIONS alat
    Ba      0.000000000    0.000000000    0.000000000
    Ti      0.500000000    0.500000000    0.500000000
     O      0.000000000    0.500000000    0.500000000
     O      0.500000000    0.000000000    0.500000000
     O      0.500000000    0.500000000    0.000000000
    Ca      0.000000000    0.000000000    1.005000000
    Ti      0.500000000    0.500000000    1.500000000
     O      0.000000000    0.500000000    1.500000000
     O      0.500000000    0.000000000    1.500000000
     O      0.500000000    0.500000000    1.000000000
K_POINTS automatic
   6 6 3   0 0 0

*********************************

A small change in the Ca atom position along Z is to enforce P4mm symmetry
during relaxation.

Here's what I get in the output:

***********************************

!    total energy              =  -552.10767780 ryd
      estimated scf accuracy    <        7.8E-10 ryd
 

      band energy sum           =   -26.93676693 ryd
      one-electron contribution =  -158.68930900 ryd
      hartree contribution      =   123.78105246 ryd
      xc contribution           =   -88.35663862 ryd
      ewald contribution        =  -428.84278264 ryd
 

      convergence has been achieved
 

      Forces acting on atoms (Ry/au):
 

      atom   1 type  1   force =     0.00000000    0.00000000    0.00111050
      atom   2 type  3   force =     0.00000000    0.00000000    0.00011367
      atom   3 type  4   force =     0.00000000    0.00000000   -0.00017387
      atom   4 type  4   force =     0.00000000    0.00000000   -0.00017387
      atom   5 type  4   force =     0.00000000    0.00000000   -0.00064692
      atom   6 type  2   force =     0.00000000    0.00000000    0.00067175
      atom   7 type  3   force =     0.00000000    0.00000000   -0.00046149
      atom   8 type  4   force =     0.00000000    0.00000000    0.00008750
      atom   9 type  4   force =     0.00000000    0.00000000    0.00008750
      atom  10 type  4   force =     0.00000000    0.00000000   -0.00061476
 

      Total force =     0.001668     Total SCF correction =     0.000063
 

      entering subroutine stress ...
 

           total   stress  (ryd/bohr**3)                  (kbar)     P=  -26.63
   -0.00016828   0.00000000   0.00000000        -24.75      0.00      0.00
    0.00000000  -0.00016828   0.00000000          0.00    -24.75      0.00
    0.00000000   0.00000000  -0.00020644          0.00      0.00    -30.37
 

 

[ ... cut ... ]


      number of scf cycles    =  38
      number of bfgs steps    =  23

      energy old              =    -552.1076788015 ryd
      energy new              =    -552.1076778004 ryd
 

      CASE: energy_new > energy_old
 

      new trust radius        =       0.0000000818 bohr
 

 

      bfgs converged in  38 scf cycles and  23 bfgs steps
 

      End of BFGS geometry calculation
 

      Final energy            =    -552.1076788015 ryd
 

      Saving the approximate inverse hessian


  [ ... cut ... ]
 

**************************

How could this thing be converged if total force is 0.001668 and I
asked for < 0.00004?

Here's grep on "Total force" in my output file:

**************************

      Total force =     0.058112     Total SCF correction =     0.000056
      Total force =     0.124018     Total SCF correction =     0.000195
      Total force =     0.156460     Total SCF correction =     0.000459
      Total force =     0.016897     Total SCF correction =     0.000249
      Total force =     0.007370     Total SCF correction =     0.000379
      Total force =     0.000659     Total SCF correction =     0.000384
      Total force =     0.000629     Total SCF correction =     0.000263
      Total force =     0.000587     Total SCF correction =     0.000093
      Total force =     0.000705     Total SCF correction =     0.000024
      Total force =     0.001393     Total SCF correction =     0.000055
      Total force =     0.001880     Total SCF correction =     0.000052
      Total force =     0.001596     Total SCF correction =     0.000088
      Total force =     0.002010     Total SCF correction =     0.000037
      Total force =     0.001721     Total SCF correction =     0.000059
      Total force =     0.002024     Total SCF correction =     0.000051
      Total force =     0.001842     Total SCF correction =     0.000032
      Total force =     0.001772     Total SCF correction =     0.000145
      Total force =     0.001728     Total SCF correction =     0.000180
      Total force =     0.001743     Total SCF correction =     0.000130
      Total force =     0.001733     Total SCF correction =     0.000094
      Total force =     0.001745     Total SCF correction =     0.000154
      Total force =     0.001726     Total SCF correction =     0.000095
      Total force =     0.001744     Total SCF correction =     0.000144
      Total force =     0.001718     Total SCF correction =     0.000101
      Total force =     0.001677     Total SCF correction =     0.000142
      Total force =     0.001705     Total SCF correction =     0.000066
      Total force =     0.001675     Total SCF correction =     0.000196
      Total force =     0.001706     Total SCF correction =     0.000082
      Total force =     0.001674     Total SCF correction =     0.000058
      Total force =     0.001674     Total SCF correction =     0.000056
      Total force =     0.001661     Total SCF correction =     0.000164
      Total force =     0.001673     Total SCF correction =     0.000032
      Total force =     0.001668     Total SCF correction =     0.000100
      Total force =     0.001653     Total SCF correction =     0.000168
      Total force =     0.001662     Total SCF correction =     0.000085
      Total force =     0.001666     Total SCF correction =     0.000043
      Total force =     0.001657     Total SCF correction =     0.000069
      Total force =     0.001668     Total SCF correction =     0.000063

**************************

The force does not go down and something is definitely wrong here!
I run a few similar calculations with a slightly different c
(celldm(3) = 2.05 and 2.10), which converge much better, to total
force of 0.000018 and 0.000064 respectively. In the latter case it
is still not what I asked for.

Would appreciate any ideas on how to fix this and get forces below
the treshold that I want. If this treshold is ridiculous or I need
to switch to a different relaxation routine, PLZ let me know as well.

Thanks,

Serge

-- 
******************************************************************************
  Serge M. Nakhmanson                                 phone: +1 (732) 445-4603
  Postdoctoral RA                                       fax: +1 (732) 445-4400
  Department of Physics & Astronomy
  Rutgers, The State University of New Jersey
  136 Frelinghuysen Road                          nakhmans at physics.rutgers.edu
  Piscataway, NJ 08854-8019
******************************************************************************




More information about the users mailing list