vc-Relax issue not converging

12 views
Skip to first unread message

KK M

unread,
Dec 21, 2025, 4:23:41 AM12/21/25
to us...@lists.quantum-espresso.org, QuantumEspresso

Earlier I posted a model for a vc-relax issue that is not converging. To test further, with a different system but the same purpose, I used another model. Still same issue. Can anyone suggest a solution? I am copying the input file.

I am performing a vc-relax calculation following an initial scf run. Below are the relevant vc-relax input parameters.

While the total force is being monitored and shows an overall decreasing trend but fluctuating, and does not converge. I have tested different optimisation algorithms (bfgscg) as well as various smearing schemes (coldgaussian), but none of these approaches have led to convergence. 

Could you please advise on possible reasons for the lack of convergence in this vc-relax calculation?

For context, the system is a perovskite slab with a water molecule adsorbed on the top surface. The c-direction contains substantial vacuum, as this is effectively a surface calculation. A similar setup with oxygen adsorption converged successfully using comparable parameters, but the present system does not.

the input file copied below: and the total force line picked up from the output file is attached.
-------------------
&CONTROL
  calculation = 'vc-relax'
  etot_conv_thr =   3.0000000000d-04
  forc_conv_thr =   1.0000000000d-04
  outdir = './out/'
  prefix = 'wat-in-co'
  pseudo_dir = '../pseudo'
  tprnfor = .true.
  tstress = .true.
  verbosity = 'high'
  max_seconds = 14400
  nstep = 120
  restart_mode = 'from_scratch'
/
&SYSTEM
  degauss =   2.0000000000d-02
  ecutrho =   3.6000000000d+02
  ecutwfc =   4.5000000000d+01
  ibrav = 0
  A = 7.5435
  nat = 25
  nosym = .true.
  ntyp = 6
  occupations = 'smearing'
  smearing = 'cold'
  input_dft='PBE'
! ##  nbnd = 220
/
&ELECTRONS
  conv_thr =   1.6000000000d-08
  electron_maxstep = 250
  mixing_beta =   2.0000000000d-01
  mixing_mode = 'plain'
/
&IONS
  ion_dynamics = 'bfgs'
  trust_radius_max = 0.1d0
/
&CELL
  cell_dynamics = 'bfgs'
  press = 0.00
  cell_factor = 2.0
  press_conv_thr = 0.5
/
CELL_PARAMETERS {alat}
  1.000000000000000   0.000000000000000   0.000000000000000
  0.506774219669180   0.862078819063949   0.000000000000000
 -1.037982346832604  -0.593866409503038   3.373555574871372
  0.506774219669180   0.862078819063949   0.000000000000000
 -1.037982346832604  -0.593866409503038   3.373555574871372
ATOMIC_SPECIES
  In  114.81800  In.pbe-dn-rrkjus_psl.0.2.2.UPF
  Cs  132.90500  Cs_pbe_v1.uspp.F.UPF
  Cl   35.45150  cl_pbe_v1.4.uspp.F.UPF
   H    1.00750  H.pbe-rrkjus_psl.1.0.0.UPF
   O   15.99900   O.pbe-n-rrkjus_psl.1.0.0.UPF
  Co   58.93300  Co_pbe_v1.2.uspp.F.UPF
ATOMIC_POSITIONS {crystal}
Cs   0.627380000000000   0.627380000000000   0.421580000000000
Cs   0.372620000000000   0.372620000000000   0.063060000000000
Cs   0.875820000000000   0.875820000000000   0.301640000000000
Cs   0.124180000000000   0.124180000000000   0.183000000000000
In   0.264260000000000   0.264260000000000   0.373420000000000
In   0.735740000000000   0.735740000000000   0.111230000000000
Co   0.500000000000000   0.500000000000000   0.242320000000000
Cl   0.386460000000000   0.815480000000000   0.295980000000000
Cl   0.112560000000000   0.619210000000000   0.423840000000000
Cl   0.184520000000000   0.613540000000000   0.188670000000000
Cl   0.380790000000000   0.887440000000000   0.060810000000000
Cl   0.613540000000000   0.184520000000000   0.188670000000000
Cl   0.887440000000000   0.380790000000000   0.060810000000000
Cl   0.815480000000000   0.386460000000000   0.295980000000000
Cl   0.619210000000000   0.112560000000000   0.423840000000000
Cl   0.338460000000000   0.338460000000000   0.301500000000000
Cl   0.115180000000000   0.115180000000000   0.407950000000000
Cl   0.661540000000000   0.661540000000000   0.183150000000000
Cl   0.884820000000000   0.884820000000000   0.076700000000000
 O   0.219100000000000   0.308150000000000   0.491880000000000
 O   0.668900000000000   0.802160000000000   0.503510000000000
 H   0.238120000000000   0.407280000000000   0.522510000000000
 H   0.203480000000000   0.196660000000000   0.504970000000000
 H   0.785340000000000   0.818540000000000   0.527750000000000
 H   0.573420000000000   0.801940000000000   0.526010000000000
K_POINTS automatic
5 5 1 0 0 0
----------------- 
total-force-file2

abd el ali el omrani

unread,
Dec 21, 2025, 7:45:54 AM12/21/25
to KK M, us...@lists.quantum-espresso.org, QuantumEspresso
Hello,
From the forces file, you need just more steps the forces are going to zero that's a good signe. Just restart the calculations with high nstep value

--
You received this message because you are subscribed to the Google Groups "QuantumEspresso" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quantumespres...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/quantumespresso/CADsoCrUK7FbVmfDOUg_YvhycwnKWdpY2ckkwACMAUnfXeT3_4A%40mail.gmail.com.

KK M

unread,
Dec 21, 2025, 9:06:46 AM12/21/25
to abd el ali el omrani, us...@lists.quantum-espresso.org, QuantumEspresso

Thank you for your reply.

I will increase the nstep value. However, in my previous trials I restarted the calculation from the point where it stopped, which is effectively equivalent to increasing nstep. Despite this, even after four such restarts, the relaxation did not converge.

I have now restarted the calculation by explicitly replacing the crystal structure with the one printed at the end of the previous run and switched the optimisation algorithm from bfgs to damp, as suggested in the forum documentation. I monitored this behaviour of this setup and the force file is now as attached. currently rerun with 'mixing_mode = 'local-TF'. will see what happens.

Thanks again. 

total-force-file3

abd el ali el omrani

unread,
Dec 21, 2025, 9:14:21 AM12/21/25
to KK M, us...@lists.quantum-espresso.org, QuantumEspresso
Another thing,
You should check the ecut ecurho kpoints did you choose the optimized ones

KK M

unread,
Dec 22, 2025, 8:07:12 AM12/22/25
to abd el ali el omrani, us...@lists.quantum-espresso.org, QuantumEspresso

Thank you. I performed this convergence testing for the bulk unit cell, but not after introducing the vacuum region and the adsorbed water molecule. In general, I monitor the final total energy to assess convergence with respect to each parameter (k-points, ecutwfc, and ecutrho), varying one parameter at a time.

Do you recommend checking any additional parameters for this system? The total energy variation is quite small and only changes in the third or fourth decimal place. Would this level of variation be considered sufficient to establish convergence?

abd el ali el omrani

unread,
Dec 22, 2025, 9:06:03 AM12/22/25
to KK M, us...@lists.quantum-espresso.org, QuantumEspresso
Increase ecutrho to 10*ecut or 12

KK M

unread,
Dec 22, 2025, 3:10:44 PM12/22/25
to abd el ali el omrani, us...@lists.quantum-espresso.org, QuantumEspresso
Yes. i am setting these two ecutrho and ecut in this proportion. 
but my question is is the energy convergence enough to track and fix these parameters? 

KK M

unread,
Dec 26, 2025, 6:15:59 AM12/26/25
to abd el ali el omrani, us...@lists.quantum-espresso.org, QuantumEspresso
hi
though i did convergence test for bulk model but did not do for slab model.
so conducted it now.
surprising is that, as below:

1. In the k-point test the total energy is going down and incresingm but the difference in energy is very less. please see the below figure
image.png
2. however, i took 10x10x1 as k-point grid and started doing test for ecutwfc .
its more strange and the ecu went upto 270 + Ry to show convergence. which appears very high in my opinion. please see the figure below for ecut Vs energy (Ry)

image.png

so i too 270 as converged ecut  and then tested back k-points. then the plot looks like below:
image.png

when i see the delta Energy for each k-point change is as below

image.png

can you suggest now and offer your opinion on this?

the slab model looks like below:
image.png
the bottom layer is a single layer of double perovskite, for your information.

abd el ali el omrani

unread,
Dec 26, 2025, 6:31:32 AM12/26/25
to KK M, us...@lists.quantum-espresso.org, QuantumEspresso
Hello
cell parameters looks not well defined
CELL_PARAMETERS {alat}
  1.000000000000000   0.000000000000000   0.000000000000000
  0.506774219669180   0.862078819063949   0.000000000000000
 -1.037982346832604  -0.593866409503038   3.373555574871372
  0.506774219669180   0.862078819063949   0.000000000000000
 -1.037982346832604  -0.593866409503038   3.373555574871372

KK M

unread,
Dec 26, 2025, 6:48:47 AM12/26/25
to abd el ali el omrani, us...@lists.quantum-espresso.org, QuantumEspresso
hi
thanks.
Maybe by mistake while copying in the email, it might have been copied twice.
but i am copying again the latest input file:
-------------------------- 
&CONTROL
  calculation = 'scf'

  etot_conv_thr =   3.0000000000d-04
  forc_conv_thr =   1.0000000000d-04
  outdir = './out/'
  prefix = 'wat-in-co'
  pseudo_dir = '../pseudo'
  tprnfor = .true.
  tstress = .true.
  verbosity = 'high'
  max_seconds = 10800

  nstep = 120
  restart_mode = 'from_scratch'
/
&SYSTEM
  degauss =   2.0000000000d-02
  ecutrho =   2700
  ecutwfc =   270

  ibrav = 0
  A = 7.5435
  nat = 25
  nosym = .true.
  ntyp = 6
  occupations = 'smearing'
  smearing = 'cold'
  input_dft='PBE'
! ##  nbnd = 220
/
&ELECTRONS
 conv_thr =         1.6000000000d-08
 electron_maxstep = 1800
 mixing_beta =      2.0000000000d-01
 mixing_mode='plain'

/
CELL_PARAMETERS {alat}
  1.000000000000000   0.000000000000000   0.000000000000000
  0.506774219669180   0.862078819063949   0.000000000000000
 -1.037982346832604  -0.593866409503038   3.373555574871372
4 4 1 0 0 0

KK M

unread,
Jan 1, 2026, 3:12:27 AMJan 1
to abd el ali el omrani, us...@lists.quantum-espresso.org, QuantumEspresso
hi Abd,
thank you for your support. i did convergence again. and started running the system.
even then there is no convergence in vc-relaxr un. see the latest Total force trend in each iteration.

Total force =     0.030071     Total SCF correction =     0.000015
     Total force =     0.027756     Total SCF correction =     0.000293
     Total force =     0.025940     Total SCF correction =     0.000173
     Total force =     0.024506     Total SCF correction =     0.000266
     Total force =     0.022890     Total SCF correction =     0.000391

the current input file is copied below:

----------------
&CONTROL
  calculation = 'vc-relax'
  etot_conv_thr =   3.0000000000d-04
  forc_conv_thr =   1.0000000000d-04
  outdir = './out/'
  prefix = 'wat-in-co'
  pseudo_dir = '../pseudo'
  tprnfor = .true.
  tstress = .true.
  verbosity = 'high'
  max_seconds = 14400
  nstep = 300

  restart_mode = 'from_scratch'
/
&SYSTEM
  degauss =   2.0000000000d-02
  ecutrho =   800
  ecutwfc =   80
  ibrav = 0
  celldm(1) = 14.25514902

  nat = 25
  nosym = .true.
  ntyp = 6
  occupations = 'smearing'
  smearing = 'cold'
  input_dft='PBE'
! ##  nbnd = 220
/
&ELECTRONS
  conv_thr =   1.0000000000d-10
  electron_maxstep = 1800
  startingwfc = 'atomic'
  startingwfc = 'atomic'
  mixing_beta =   1.0000000000d-01
  mixing_mode = 'local-TF'
  diagonalization = 'cg'
/
&IONS
  ion_dynamics = 'damp'

  trust_radius_max = 0.1d0
/
&CELL
  cell_dynamics = 'bfgs'
  press = 0.00
  cell_factor = 2.0
  press_conv_thr = 0.5
/
ATOMIC_SPECIES
  In  114.81800  In.pbe-dn-rrkjus_psl.0.2.2.UPF
  Cs  132.90500  Cs_pbe_v1.uspp.F.UPF
  Cl   35.45150  cl_pbe_v1.4.uspp.F.UPF
   H    1.00750  H.pbe-rrkjus_psl.1.0.0.UPF
   O   15.99900   O.pbe-n-rrkjus_psl.1.0.0.UPF
  Co   58.93300  Co_pbe_v1.2.uspp.F.UPF
CELL_PARAMETERS (alat)
   1.004555450  -0.002564602   0.010782615
   0.506876197   0.873282546   0.016009926
  -1.004801044  -0.558543769   3.493011557
ATOMIC_POSITIONS (crystal)
Cs               0.6107095049        0.5695565070        0.3938503485
Cs               0.3794658705        0.3795700051        0.0697507086
Cs               0.8642866075        0.8639939226        0.2959064187
Cs               0.1274199842        0.1266921023        0.1852695095
In               0.2729701669        0.2760045473        0.3836419084
In               0.7282387961        0.7258600490        0.1051295365
Co               0.4990375007        0.4977865283        0.2395123105
Cl               0.3895302220        0.7984252282        0.2879725157
Cl               0.1088857622        0.6328122163        0.4193070142
Cl               0.1926855670        0.6113198246        0.1899078865
Cl               0.3744576438        0.8885218448        0.0610236398
Cl               0.6092032995        0.1964447217        0.1904918261
Cl               0.8873564441        0.3765433934        0.0614007622
Cl               0.8076462734        0.3835461011        0.2875640455
Cl               0.6322253403        0.1095151927        0.4210648676
Cl               0.3261190760        0.3281677060        0.3065704781
Cl               0.1095871010        0.0840723830        0.3892683577
Cl               0.6666390431        0.6660750523        0.1788328501
Cl               0.8849115542        0.8852371581        0.0785126477
O                0.2071032889        0.3404832115        0.5014923621
O                0.6544363517        0.8403414037        0.5168323347
H                0.2545606340        0.4017621264        0.5340039085
H                0.2142317866        0.2174511673        0.5080446855
H                0.7865481625        0.8273198829        0.5361705230
H                0.6001040189        0.8072277244        0.5392585545

K_POINTS automatic
4 4 1 0 0 0
----------------------
the convergence test results are below
:
image.png

image.png

abd el ali el omrani

unread,
Jan 1, 2026, 5:04:40 PMJan 1
to KK M, us...@lists.quantum-espresso.org, QuantumEspresso
Adsorption can be a bit tricky, so just let the calculation run — from my experience, it can take over 100 iterations depending on the initial position, and sometimes even up to 200. You can visualize the output with XCrySDen to see what the molecule is doing. Also, if you’re using a slab, fix the bottom layers and let only the top layers relax.

M SK

unread,
Jan 2, 2026, 7:43:07 AMJan 2
to abd el ali el omrani, KK M, us...@lists.quantum-espresso.org, QuantumEspresso
thank you for the reply.
no of iterations is not a problem. hope you talking about 'electron_maxstep' tag. 

i never used xcrysden. can we directly see how the molecule or system is being modified for each run?


 
Regards
Sri
 
 


abd el ali el omrani

unread,
Jan 2, 2026, 11:29:58 AMJan 2
to M SK, KK M, us...@lists.quantum-espresso.org, QuantumEspresso
Yes, you can observe the system during the relaxation steps with xcrysden.

KK M

unread,
Jan 2, 2026, 12:07:48 PMJan 2
to abd el ali el omrani, M SK, us...@lists.quantum-espresso.org, QuantumEspresso
thank you.
can you please give some hint, how can i use the output file to visualise through XcrySden?
i mean the steps to view. and what aspects need attention to check if its running correctly or not?

KK M

unread,
Jan 3, 2026, 9:23:46 AMJan 3
to abd el ali el omrani, M SK, us...@lists.quantum-espresso.org, QuantumEspresso

hi
now i made a fresh slab model with 3 layers. (earlier i made only one atomic layer so its not a practical )

image.png

for this i made k-point convergence test and the results as below
image.png
so, i selected 2x2x1 k-point grid.
seems this is OK?



Reply all
Reply to author
Forward
0 new messages