bjmorgan / py-sc-fermi

py-sc-fermi is a materials modelling code for calculating self-consistent Fermi energies and defect concentrations under thermodynamic equilibrium (or quasi-equilibrium) given defect formation energies.
MIT License
23 stars 9 forks source link

Change `conv` to 1e-20 #5

Closed kavanase closed 2 years ago

kavanase commented 2 years ago

Thanks for making such a useful package!

I noticed when calculating the SCF Fermi level for my system (CdTe), the conv parameter had to be decreased from the default 1e-16 to 1e-20, to converge the result. As this doesn't really add a noticeable increase to the calculation time, and is also a parameter that I guess most people would assume doesn't need to be touched, I think it should be decreased to be safe.

I think a lot of the reason my system is likely to be relatively sensitive to this parameter, is the very low effective DOS at the CBM:

image

So I think this will primarily be relevant for people doing defects in high mobility semiconductors.

I've attached a notebook PDF example showing how the output Fermi level changes with the choice of this parameter.

PR_PySCFermi_conv.pdf

alexsquires commented 2 years ago

Thanks Seán, am happy with this change. I will flag convergence testing in the docs.