Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convergence Problem #3

Open
potti-charles opened this issue Jan 23, 2024 · 1 comment
Open

Convergence Problem #3

potti-charles opened this issue Jan 23, 2024 · 1 comment

Comments

@potti-charles
Copy link

Dear Zhaoming,

Thanks for sharing this usefel tool.

I got one problem when I calculated the copper surface. The NELECT kept changing but not converged for long run.

This is the tmp-log-FCP.log

<style> </style>
loop NELECT Fermi(eV) Fermishift(eV) mu(eV) Ucal(V) conv(V) Ewithoutentropy(eV) Ewithoutentropy_grand(eV) Etoten(eV) Etoten_grand(eV) Cpersurf(e/V/A^2) time(s)
1 416.5 -7.58968 2.353605 -5.4 0.636077 0.163923 -100.321 -212.286 -111.965 0.0125 2709  
2 416.3957 -7.70972 2.353665 -5.4 0.756054 0.043946 -123.691 -259.835 -136.143 0.0125 3080  
3 416.3574 -7.44744 2.353669 -5.4 0.493771 0.306229 -115.005 -242.759 -127.755 0.017079 3120  
4 416.0911 -7.62028 2.353673 -5.4 0.666611 0.133389 -113.434 -241.69 -128.256 0.017079 3096  
5 412.4948 -9.58383 2.353642 -5.4 2.630192 -1.83019 -76.4291 -119.114 -76.4528 -119.138 0.529477 3172
6 416.0491 -7.72991 2.353669 -5.4 0.776243 0.023757 -108.167 -231.476 -123.31 0.038139 3094  
7 416.003 -7.79553 2.353669 -5.4 0.841859 -0.04186 -111.813 -239.125 -127.313 0.038108 3088  
8 416.0844 -7.57615 2.353605 -5.4 0.622548 0.177452 -113.066 -241.007 -127.94 0.038167 3183  
9 415.7423 -8.00652 2.353605 -5.4 1.052917 -0.25292 -113.793 -245.112 -131.319 0.037864 3086  
10 416.2299 -7.43499 2.353605 -5.4 0.481385 0.318615 -114.495 -242.731 -128.237 0.037861 3095  
11 415.1292 -8.36489 2.353605 -5.4 1.41128 -0.61128 -105.62 -233.522 -127.902 0.067844 3080  

we can see that the Ucal changes, but not converged to the set value of 0.8 V. How can I fix it?

P.S. This is my script

from ase.calculators.FCPelectrochem import FCP

from ase.calculators.vasp import Vasp
from ase.io import read
from ase.optimize import LBFGS

cal_sol=Vasp(xc='PBE', #functional
pp='PBE', #type of pseudopotential
kpts=(3, 3, 1), #kpoint
ncore=4,
ispin=2,lasph=True,ismear=0, sigma=0.1, algo='Fast', ediff=1E-5, prec='Accurate', encut=400, nelm=500 , addgrid='Ture',lreal='Auto',lorbit=11, ldau_luj={'Cu': {'L': 2, 'U': 5.0, 'J': 0.46}}, lmaxmix=4, #parameters for SCF
tau=0, lrhoion=False, lsol=True, eb_k=78.4, lambda_d_k=3.0, #parameters for vaspsol
lwave=True, lcharg = False, #write WAVECAR to speed up the SCF of the next ionic step
)
cal_sol.set(label='sol', directory='sol')

cal_FP=FCP(innercalc=cal_sol,
fcptxt='log-fcp.txt',
U=0.8,
NELECT = 416.5,
C = 1/80, #1/k capacitance per A^2
FCPmethod = 'Newton-fitting',
FCPconv=0.01,
NELECT0=418,
adaptive_lr=False,
work_ref=4.6,
max_FCP_iter=10000
)

atoms=read('POSCAR')
atoms.calc=cal_FP
dyn=LBFGS(atoms, trajectory='fp.traj')
dyn.run(fmax=0.01)

This is my POSCAR
CONTCAR
1.0
6.640630 -3.833971 0.000000
0.000000 7.667940 0.000000
0.000000 0.000000 16.260851
H C O Cu Ag
2 2 2 33 3
Selective Dynamics
Direct
0.835122 0.729924 0.606477 T T T
0.192244 -0.032920 0.602237 T T T
0.829531 0.725088 0.489406 T T T
0.033103 0.896433 0.497212 T T T
0.736450 0.649656 0.563126 T T T
0.080419 0.950958 0.566204 T T T
0.946910 0.978576 0.008843 F F F
0.940488 0.987888 0.393301 T T T
0.167276 0.088266 0.264884 T T T
0.058644 0.201401 0.134865 F F F
0.280228 0.978880 0.009939 F F F
0.258950 0.972238 0.401684 T T T
0.497780 0.089135 0.264434 T T T
0.390635 0.201232 0.135802 F F F
0.613327 0.978685 0.008384 F F F
0.617769 0.980433 0.391651 T T T
0.831692 0.087360 0.261974 T T T
0.724487 0.200199 0.133988 F F F
0.947145 0.312759 0.009600 F F F
0.944833 0.311880 0.386815 T T T
0.169872 0.425090 0.263198 T T T
0.058967 0.534527 0.134288 F F F
0.280658 0.312533 0.010239 F F F
0.502950 0.423431 0.267105 T T T
0.391766 0.534532 0.134958 F F F
0.613326 0.312687 0.009926 F F F
0.831455 0.421761 0.262207 T T T
0.724174 0.534967 0.133898 F F F
0.946623 0.645636 0.009342 F F F
0.939715 0.635500 0.391270 T T T
0.166353 0.756119 0.265096 T T T
0.057968 0.869642 0.134726 F F F
0.280875 0.645952 0.009577 F F F
0.501393 0.753946 0.265366 T T T
0.392576 0.869471 0.135091 F F F
0.613685 0.645050 0.008338 F F F
0.629998 0.658682 0.396681 T T T
0.835556 0.757300 0.261589 T T T
0.725275 0.868654 0.133221 F F F
0.616943 0.306214 0.418494 T T T
0.281567 0.655506 0.412118 T T T
0.276890 0.314533 0.406836 T T T

@IMPLICIT-NONE
Copy link

Hi, this issue may be caused by insufficient kpoints resulting in the Fermi energy levels constantly jumping between two k-points with large energy level differences during the calculation. Try using a larger kpoint, or a larger SIGMA value.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants