Environ convergence issues HCOO/H2O on Pb surface

184 views
Skip to first unread message

Oskar Cheong

unread,
Jul 12, 2021, 4:46:32 AM7/12/21
to quantum-environ-users
Hello everyone,
 I came across Environ and tried to test it on my Pb-water-adsorbate(HCOO) system. However, I came across some convergence issues when using different adsorbates. For HCOO on Pb-surface it worked and I got some results. However, when I used H2O as an adsorbate on Pb-surface or even HCOO with one explicit H2O on Pb surface, I seem to get some convergence issues. The total forces do converge in the output file, but seems like the simulation is not yet finished. I tried to play around with some parameters, but maybe you have a better suggestion? :) 
 
I have  attached the input file and envrion.in  for H2O on Pb surface . 
I kept the parameters in environ the same and quite suprised that it works for HCOO adosrbate, but not for H2O. 

I would be grateful for any feedback or advice.

Environ file:

 &ENVIRON
   verbose = 0
   environ_thr = 1.d0
   environ_type = 'water'
   env_electrostatic = .true.
 /
 &BOUNDARY
   solvent_mode='full'
 /
 &ELECTROSTATIC
   pbc_correction = 'parabolic'
   pbc_dim = 2
   pbc_axis = 3
   tol = 1.d-11
   mix = 0.6
   solver = 'cg'
   auxiliary = 'none'
 /

pw.x input file:

&CONTROL
    calculation     = 'relax'
    restart_mode    = 'from_scratch'
    pseudo_dir      = './'
    outdir          = './'
    prefix          = 'Pb'
    wf_collect      = .true.
    nstep           = 50000
    etot_conv_thr   = 1.0e-4
    forc_conv_thr   = 1.0e-3
    disk_io         = 'low'
    tprnfor     = .true.
    max_seconds     = 85000
/
&SYSTEM
    ibrav           = 0
    nat             = 48
    ntyp            = 3
    ecutwfc         = 50.0
    ecutrho         = 200.0
    input_DFT       = 'pbe'
    occupations     = 'smearing'
    smearing        = 'gaussian'
    degauss         = 0.02
    nosym           = .true.
/
&ELECTRONS
    diagonalization = 'david'
    electron_maxstep= 1000
    conv_thr        = 1.0e-6
    mixing_beta     = 0.3

/
$IONS
/

ATOMIC_SPECIES
Pb    207.2  Pb.pbe-dn-kjpaw_psl.1.0.0.UPF
O     16.0   O.pbe-n-kjpaw_psl.1.0.0.UPF
H     1.0    H.pbe-kjpaw_psl.1.0.0.UPF

# Pt    195.07800  Pt.pbe-n-kjpaw_psl.1.0.0.UPF
# O      15.99940  O.pbe-n-kjpaw_psl.1.0.0.UPF
# H       1.00794  H.pbe-kjpaw_psl.1.0.0.UPF
# Using ultrasoft is a nice choice

ATOMIC_POSITIONS angstrom
Pb            7.1135000000        3.5567000000       11.3176000000    0   0   0
Pb            3.5567000000        0.0000000000       11.3176000000    0   0   0
Pb            0.0000000000        7.1135000000       11.3176000000    0   0   0
Pb            0.0000000000        0.0000000000       11.3176000000    0   0   0
Pb            7.1135000000        0.0000000000       11.3176000000    0   0   0
Pb            3.5567000000        3.5567000000       11.3176000000    0   0   0
Pb            0.0000000000        3.5567000000       11.3176000000    0   0   0
Pb            7.1135000000        7.1135000000       11.3176000000    0   0   0
Pb            3.5567000000        7.1135000000       11.3176000000    0   0   0
Pb            8.8918000000        8.8918000000       13.8326000000    0   0   0
Pb            5.3351000000        5.3351000000       13.8326000000    0   0   0
Pb            5.3351000000        1.7784000000       13.8326000000    0   0   0
Pb            8.8918000000        1.7784000000       13.8326000000    0   0   0
Pb            1.7784000000        8.8918000000       13.8326000000    0   0   0
Pb            1.7784000000        5.3351000000       13.8326000000    0   0   0
Pb            8.8918000000        5.3351000000       13.8326000000    0   0   0
Pb            1.7784000000        1.7784000000       13.8326000000    0   0   0
Pb            5.3351000000        8.8918000000       13.8326000000    0   0   0
Pb            0.0013854337        0.0059350921       16.3987801881
Pb            7.1137414223        7.1221591403       16.4219240110
Pb            3.5573889905        3.5652477248       16.4172445480
Pb            0.0019360511        7.1219730009       16.4185530379
Pb            7.1139004282        0.0089689779       16.4180838239
Pb            3.5596530284        7.1208200486       16.4225650948
Pb            0.0010060812        3.5621135800       16.4152937416
Pb            3.5581432061        0.0077925305       16.4184223773
Pb            7.1139939591        3.5662985617       16.4164092552
Pb            8.8972875741        8.9126802764       19.0130810223
Pb            8.8961758122        1.7875782220       19.0097933529
Pb            8.8972397927        5.3437782841       19.0151830673
Pb            5.3390699495        5.3467040970       19.0225082460
Pb            5.3396061103        8.9144196355       19.0243350008
Pb            5.3355470470        1.7954974560       19.0157391897
Pb            1.7803995508        8.9081290698       19.0134860910
Pb            1.7790440180        5.3380310392       19.0153296280
Pb            1.7751163080        1.7824184341       19.0103503934
Pb            7.1247820219        7.1385763623       21.3744371939
Pb            7.1305882965        3.5592992171       21.3833293693
Pb            0.0010317972        3.5611383412       21.3908062923
Pb            7.1119535236        0.0327171012       21.3950026164
Pb            3.5564427804        7.1326675071       21.3714498366
Pb            0.0043709409        7.1217450718       21.3789998066
Pb            3.5446997556        3.5538488702       21.3847661443
Pb            0.0013815575        0.0150701282       21.3855857015
Pb            3.5631717376        0.0267181291       21.3948447088
O             5.3327557138        4.6480265752       24.6139308641
H             5.2113024791        5.1669722576       25.4309057312
H             5.3237124008        5.3142228730       23.9015642920

CELL_PARAMETERS angstrom
10.67024132810500 0.00000000000000 0.00000000000000
-0.00000000000000 10.67024132810500 0.00000000000000
0.00000000000000 0.00000000000000 35.21000000000000

K_POINTS automatic
4 4 1 0 0 0      


Grep "Total force" from output file

....

    Total force =     0.001861     Total SCF correction =     0.000313

     Total force =     0.001835     Total SCF correction =     0.000307

     Total force =     0.001990     Total SCF correction =     0.000138

     Total force =     0.002246     Total SCF correction =     0.000321

     Total force =     0.001926     Total SCF correction =     0.000373

     Total force =     0.001898     Total SCF correction =     0.000326

     Total force =     0.001982     Total SCF correction =     0.000289


Kind regards,
Oskar Cheong



andr...@gmail.com

unread,
Jul 19, 2021, 11:07:25 AM7/19/21
to quantum-environ-users
Hi Oskar,

I am sorry for taking so long to look at your inputs. Can you share the whole output here? I understand you would like to total force to converge more. I am not too sure what is the source of the problem yet. I would start by simplifying your input, to remove effects that may not be that relevant. Your input uses environ_type = water, but this is mostly meant to study solvation of isolated organic molecules. Using this for slabs is not fully correct, it is probably ok if you are only interested in energy differences between solvated systems, not to compute solvation energies of slab systems. The main issue is that environ_type = water includes surface and volume terms, but the latter is sort of unphysical for slabs, as the number of layers in a slab is a numerical parameter. I would rather use no environ_type (i.e. the default environ_type = input) and manually specify only the dielectric permittivity of the solvent, e.g. env_static_permittivity = 78.3 (for water). 

The surface term has a functional derivative that can be rapidly varying and may make convergence a bit more tricky, so removing it may already help with your issue. 

Another possibility is to try to smoothen the continuum interface by using the solvent_aware correction. I believe there should be other messages in this group dealing with the solvent_aware. Let me know if you need more details or have other issues.

Thanks again for using Environ and reporting your issues!

Best,

Oliviero

Oliviero Andreussi
--
Assistant Professor
Department of Physics
University of North Texas
Email: oliviero....@unt.edu 
Phone: +1-(940)-369-5316
Skype: olivieroandreussi
Web: https://www.materialab.org


Oskar Cheong

unread,
Jul 25, 2021, 4:26:31 PM7/25/21
to quantum-environ-users
Hi Oliviero,
thank you for the detailed response. I have tried with the default environ_type and it works for adsorbates like HCOO or COOH, but for H2O on Pb surface there is still no convergence (after restarting twice). Do you know where this problem comes from for H2O? I mean the force is actually in a quite good threshold to converge...
I have attached the environ.in file, the input_pwscf file and the output file (unfortunately I cannot attach files here otherwise I would have attached the whole output file)

 &ENVIRON
   verbose = 0
   environ_thr = 1.d0
   env_static_permittivity = 78.3
   env_electrostatic = .true.
 /
 &BOUNDARY
   solvent_mode='full'
 /
 &ELECTROSTATIC
   pbc_correction = 'parabolic'
   pbc_dim = 2
   pbc_axis = 3
   tol = 1.d-11
   mix = 0.6
   solver = 'cg'
   auxiliary = 'none'
 /

INPUT_PWSCF
Pb            0.0008643684        0.0049043337       16.4062803631
Pb            7.1131298425        7.1204782745       16.4089463504
Pb            3.5571044901        3.5639202355       16.4034762775
Pb            0.0010052913        7.1203234989       16.4081118184
Pb            7.1139296793        0.0070841362       16.4054945064
Pb            3.5589820252        7.1201414265       16.4092172316
Pb            0.0007189552        3.5632797197       16.4056969058
Pb            3.5578077401        0.0067433312       16.4054630389
Pb            7.1144513070        3.5641935608       16.4030107217
Pb            8.8892612517        8.9049988150       18.9941168897
Pb            8.8920401527        1.7898639835       18.9889557394
Pb            8.8902018344        5.3417395206       18.9951163536
Pb            5.3373773370        5.3397530939       18.9953099656
Pb            5.3372528730        8.9040927949       19.0013435017
Pb            5.3366319756        1.7924661748       18.9925218623
Pb            1.7837362528        8.9039667348       18.9939417326
Pb            1.7830795280        5.3405773351       18.9951273016
Pb            1.7801365191        1.7890237888       18.9890160236
Pb            7.1108143598        7.1199792913       21.3500393183
Pb            7.1206866539        3.5581373816       21.3583256833
Pb            0.0011251138        3.5655674263       21.3521068910
Pb            7.1091096363        0.0262011946       21.3566765863
Pb            3.5644465023        7.1190361876       21.3484225313
Pb            0.0016422569        7.1207043850       21.3421764079
Pb            3.5555557320        3.5580445108       21.3584353853
Pb            0.0007657068        0.0175093531       21.3433532689
Pb            3.5648375324        0.0246771555       21.3551054369
O             5.3426118423        4.6314812523       24.5576599646
H             5.2227814292        5.2200918184       25.3264562672
H             5.3228698849        5.2334668296       23.7900922720

CELL_PARAMETERS angstrom
10.67024132810500 0.00000000000000 0.00000000000000
-0.00000000000000 10.67024132810500 0.00000000000000
0.00000000000000 0.00000000000000 35.21000000000000

K_POINTS automatic
4 4 1 0 0 0      

OUTPUT_FILE (only couple lines)
!    total energy              =  -39218.35760069 Ry
     Harris-Foulkes estimate   =  -39422.89369925 Ry
     estimated scf accuracy    <          6.1E-09 Ry

     total all-electron energy =  -1879535.985068 Ry

     The total energy is the sum of the following terms:

     one-electron contribution =  -58538.76377901 Ry
     hartree contribution      =   29519.94885256 Ry
     xc contribution           =   -1473.71865592 Ry
     ewald contribution        =   24410.72611886 Ry
     one-center paw contrib.   =  -33341.01780171 Ry
     smearing contrib. (-TS)   =      -0.06843402 Ry
     electrostatic embedding   =      -0.03422896 Ry
     correction to one-el term =     204.57032750 Ry

     WARNING: you are using the parabolic pbc correction;
              the potential shift above must be added to 
              band and Fermi energies.

     convergence has been achieved in   9 iterations

     negative rho (up, down):  8.404E-03 0.000E+00
 WARNING: Unphysical forces due to core electrons are non-negligible 
 atom type  47 is subject to a spurious force of     0.014448 
 WARNING: Unphysical forces due to core electrons are non-negligible 
 atom type  48 is subject to a spurious force of     0.000037 


Thanks for taking your time!

Kind regards,
Oskar

andr...@gmail.com

unread,
Jul 26, 2021, 11:20:33 AM7/26/21
to quantum-environ-users
Hi Oskar,

I see a potential problem from your output. The code is complaining about unphysical forces on the hydrogen atoms. This is because of the solvent_mode='full' keyword, which introduces an additional 'core' density on the atoms to avoid pockets of continuum to appear inside heavy atoms, for which the pseudo-potentials leave a low density near the ions. While Pb and Pt atoms require this correction and do not give any problem, it is possible that acidic hydrogen atoms, in which the electronic density is low, give rise to errors and these errors are totally spurious (there should be no core electrons for hydrogen). You can turn off this correction for individual elements by setting in the &BOUNDARY namelist the keyword corespread(3)=0.0 (3 being the index associated with hydrogen atoms, since they are the third ones reported in the ATOMIC_SPECIES card). I am not sure this is the origin of the poor convergence, but for sure is something that should be fixed. If this is the source of problems, than it may be that for the other adsorbates the hydrogen were less acidic and the effect of the fictitious core was less relevant, you can see that also for the water case only one of the two hydrogens has significant spurious forces. 

Let me know if this solves or helps with your issue.

Best,

Oliviero

Oskar Cheong

unread,
Jul 29, 2021, 5:02:39 AM7/29/21
to quantum-environ-users
Hello Oliviero, 

thank you for the advice. I tried it with corespread(3)=0.0, but still got the same error that the errors are totally spurious. Do you think I should change the solvent_mode to "electronic"?

Thanks again.

Best,
Oskar 

Oskar Cheong

unread,
Aug 14, 2021, 3:55:41 AM8/14/21
to quantum-environ-users
Hello Oliviero, 
some good and bad news. For H2O adsorbate on Pb(100) slab convergence was reached as I changed to electronic solvent_mode. However, when I added an explicit water molecule to my HCOO adsorbate on Pb(100) surface (I relaxed this system before in vacuum), it seems like 
I get some convergence issues. I looked through the google groups of environ to find out what causes the convergence issue, but seems like I cannot find an answer.  For single adsorbates I get convergence, but unfortunately not for 2 or more adsorbates. Forces and energies seemed to be below the threshold but there is still no convergence

I tried to change the tol, use solvent_aware corrections, but unfortunately no convergence.

Any recommendations I could try? I should use the "relax" command in my input file right? Single point calculation is not enough right?

Thanks again for the help.

Kind regards,
Oskar Cheong

P.S: I have attached the input files. The out
Archive.zip

Oskar Cheong

unread,
Aug 14, 2021, 3:56:15 AM8/14/21
to quantum-environ-users

P.S: I have attached the input files and output files. :)
Reply all
Reply to author
Forward
0 new messages