mturiansky / nonrad Goto Github PK
View Code? Open in Web Editor NEWImplementation for computing nonradiative recombination rates in semiconductors
Home Page: https://nonrad.readthedocs.io/en/latest/
License: MIT License
Implementation for computing nonradiative recombination rates in semiconductors
Home Page: https://nonrad.readthedocs.io/en/latest/
License: MIT License
Hello, I tried to reproduce the results being shown in the notebook. In short, I took a hexagonal GaN, then used PBESol to optimize the structure. Afterward, I made a supercell out of it and introduced C_N, I used PBEsol to optimize the geometries using PBESol considering neutral and negatively charged states. Then, on top of the PBESol optimized geometries, I did single shot HSE06 calculations. Then I computed the CC diagram, but it did not match what was shown in the notebook. Also, my el-ph coupling matrix is weird. I am adding my code and some snapshots for reference. Also, I am adding my INCAR, CONTCAR and KPOINTS file for reference for neutral state calculations.
#SYSTEM = Halide Perovskites
LHFCALC = .TRUE. # Use hybrid functionals
HFSCREEN = 0.2 # Use HSE06
AEXX = 0.25
ISMEAR = 1 # first order Methfessel-Paxton
SIGMA = 0.2 # broadening (default)
LREAL = A # evaluate projection operators in real space
NCORE = 32
NPAR = 8
PREC = Normal # Normal defaults
PRECFOCK = Normal # Normal defaults for HF
#for 64 MPIs
#NBANDS = 216 # For consistency; default = 210
#NSIM = 18 # Do them all at once...
#NBANDS = 256 # For consistency; default = 210
#NSIM = 8 # Do them all at once...
#NSIM = 105 # Do them all at once... (total number of atoms)
ALGO = All # Use Congugate Gradient to allow HF-calcs
NELM = 100 # maximum number of electronic SC steps
NELMDL = 5
EDIFF = 1E-02 # stopping-criterion for ELM
NSW = 0 # maximum number of ionic steps
ISIF = 0 # calculate/relax/change everything
IBRION = -1 # ion update algorithm (2 = CG)
POTIM = 0.5 # force scaling constant (think relaxation)
LWAVE = T # Don't store the WAVECAR
LCHARG = F # Don't store the CHGCAR
LVTOT = .TRUE.
LORBIT = 11
EMIN = -20
EMAX = 10
NEDOS = 2000
KPAR=4 ; NCSHMEM = -1 ; FFTWMAKEPLAN = E ; PREC=Normal
Generated by VASPKIT code
1.0000000000000000
9.5448821759636306 -0.0000001223507782 0.0000003271666213
-4.7724411930677260 8.2661103114839474 0.0000000517088665
0.0000003555989914 0.0000002699779637 10.3657172070195980
C Ga N
1 36 35
Direct
0.4444445427754928 0.2222221679046825 0.6866849657141003
0.1114942875487870 0.2219546576285509 0.4994739096721048
0.1110275570975929 0.2223441628518188 0.9999700790541439
0.1111112929480811 0.5555554014778252 0.4995887251168654
0.1111112923120245 0.5555553908996913 0.9996003583748134
0.1114941296417982 0.8895389464125145 0.4994738776249363
0.1110275782080024 0.8886828046835689 0.9999700797443936
0.4444445968724509 0.2222218994454366 0.5001595322570154
0.4444447064680404 0.2222221404005893 0.9987438271723050
0.4447120434421734 0.5551724012610109 0.4994739273027022
0.4443225092700658 0.5556391442453474 0.9999700779125860
0.4447118903757996 0.8895389826578111 0.4994739452198615
0.4443224812150035 0.8886828245814939 0.9999700771185189
0.7771276528430349 0.2219547739125787 0.4994738098969052
0.7779838020470748 0.2223441281061156 0.9999700977320884
0.7771277152993932 0.5551725363111828 0.4994737566032583
0.7779837942157570 0.5556390620991820 0.9999701239229069
0.7777779520762707 0.8888887129054623 0.4993687542584766
0.7777779332282009 0.8888887460276962 0.9997792950593336
0.2220763586843759 0.1110384369559725 0.2489290363667607
0.2225028640800062 0.1112517286793775 0.7507362769216996
0.2222326992723467 0.4444339985909096 0.2496653518297762
0.2223364158958461 0.4443303095043305 0.7495655499388008
0.2222326840937114 0.7777992595067857 0.2496653265781603
0.2223364269729373 0.7780066264593941 0.7495655657945974
0.5556282428354962 0.1110383969292670 0.2489290197942537
0.5554149349416093 0.1112517155471551 0.7507362334109047
0.5556281500400644 0.4445902641214019 0.2489291202382091
0.5554148982262888 0.4441638007290720 0.7507361800989045
0.5554596436506003 0.7777301289194440 0.2496825306638684
0.5560251909727043 0.7780128177359487 0.7500401351611785
0.8889365267546410 0.1112069606282944 0.2496825253054951
0.8886538676492819 0.1106415265563143 0.7500400605056186
0.8888674391842102 0.4444339945697280 0.2496653113294656
0.8886600554780557 0.4443302917994032 0.7495655396311207
0.8889365352463443 0.7777300919216898 0.2496824609728066
0.8886537350148700 0.7780129218039278 0.7500401747104561
0.1108988077522284 0.2225054076354738 0.1878501211656953
0.1097435801495479 0.2221124101974752 0.6878324757605299
0.1111111886867704 0.5555554933444995 0.1879271467396890
0.1111111881720959 0.5555555073636853 0.6879963275178724
0.1108987794618912 0.8883931963394147 0.1878501134667090
0.1097436014584758 0.8876309083897809 0.6878324391733841
0.4444444944823047 0.2222221734191763 0.1873606843397582
0.4441612974017275 0.5557678983395533 0.1878501352596373
0.4445542814894878 0.5569231517123043 0.6878324674298923
0.4441612624621527 0.8883931737340092 0.1878500999986841
0.4445542008575885 0.8876309076650415 0.6878324885487004
0.7782735117342199 0.2225054421545281 0.1878501326605075
0.7790358100458832 0.2221125217502689 0.6878324603326433
0.7782734413082579 0.5557678619634103 0.1878501485436601
0.7790358208642942 0.5569231546117734 0.6878324047262012
0.7777778494840462 0.8888888235468855 0.1878881046615390
0.7777779217825440 0.8888888460578954 0.6878668768998111
0.2208238680144916 0.1104119814382116 0.4357487435004899
0.2204440237881400 0.1102220698154923 0.9394223730643674
0.2222298665079094 0.4444368463392792 0.4380168502742094
0.2222081479121485 0.4444585538791515 0.9378213314868518
0.2222298151099835 0.7777932465318003 0.4380167973367861
0.2222081097779309 0.7777497994226295 0.9378213267220303
0.5562546485221276 0.1104120215708662 0.4357486995485118
0.5564445528735220 0.1102221410320752 0.9394224501348276
0.5562547033461982 0.4458428079342340 0.4357488270380756
0.5564446336985895 0.4462227262323211 0.9394223452736412
0.5555687937542828 0.7777845160900441 0.4379284033445003
0.5557088028827692 0.7778545186128270 0.9378689305273227
0.8888822074439418 0.1110979051659697 0.4379283629979653
0.8888122190206786 0.1109579126659455 0.9378689327208818
0.8888734879187297 0.4444368930539824 0.4380167925735492
0.8889168902494049 0.4444586035070017 0.9378213170379510
0.8888822001813139 0.7777845421207488 0.4379283344308718
0.8888122005257841 0.7778545175911376 0.9378689357528387
0
Gamma
2 2 2
0.000 0.000 0.000
import os
from pathlib import Path
from shutil import copyfile
from pymatgen.core import Structure
from nonrad.ccd import get_cc_structures
import numpy as np
ground_files = Path('/scratch/negishi/rahma103/Projects_29_March_2024/NonRad/C0')
ground_struct = Structure.from_file(str(ground_files / 'CONTCAR'))
excited_files = Path('/scratch/negishi/rahma103/Projects_29_March_2024/NonRad/C-')
excited_struct = Structure.from_file(str(excited_files / 'CONTCAR'))
cc_dir = Path('/scratch/negishi/rahma103/Projects_29_March_2024/NonRad/cc_dir')
os.mkdir(str(cc_dir))
os.mkdir(str(cc_dir / 'ground'))
os.mkdir(str(cc_dir / 'excited'))
displacements = np.linspace(-0.5, 0.5, 9)
ground, excited = get_cc_structures(ground_struct, excited_struct, displacements)
for i, struct in enumerate(ground):
working_dir = cc_dir / 'ground' / str(i)
os.mkdir(str(working_dir))
# write structure and copy necessary input files
struct.to(filename=str(working_dir / 'POSCAR'), fmt='poscar')
for f in ['KPOINTS', 'POTCAR', 'INCAR', 'job.sh']:
copyfile(str(ground_files / f), str(working_dir / f))
for i, struct in enumerate(excited):
working_dir = cc_dir / 'excited' / str(i)
os.mkdir(str(working_dir))
# write structure and copy necessary input files
struct.to(filename=str(working_dir / 'POSCAR'), fmt='poscar')
for f in ['KPOINTS', 'POTCAR', 'INCAR', 'job.sh']:
copyfile(str(excited_files / f), str(working_dir / f))
from glob import glob
from nonrad.ccd import get_dQ, get_PES_from_vaspruns, get_omega_from_PES
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
dQ = get_dQ(ground_struct, excited_struct) # amu^{1/2} Angstrom
ground_vaspruns = glob(str(cc_dir / 'ground' / '' / 'vasprun.xml'))
excited_vaspruns = glob(str(cc_dir / 'excited' / '' / 'vasprun.xml'))
ground_vaspruns = ground_vaspruns + [str(ground_files / 'vasprun.xml')]
excited_vaspruns = excited_vaspruns + [str(excited_files / 'vasprun.xml')]
Q_ground, E_ground = get_PES_from_vaspruns(ground_struct, excited_struct, ground_vaspruns)
Q_excited, E_excited = get_PES_from_vaspruns(ground_struct, excited_struct, excited_vaspruns)
E_excited = 1.07 + E_excited
fig, ax = plt.subplots(figsize=(5, 5))
ax.scatter(Q_ground, E_ground, s=10)
ax.scatter(Q_excited, E_excited, s=10)
q = np.linspace(-1.0, 3.5, 100)
ground_omega = get_omega_from_PES(Q_ground, E_ground, ax=ax, q=q)
excited_omega = get_omega_from_PES(Q_excited, E_excited, ax=ax, q=q)
ax.set_xlabel('$Q$ [amu$^{1/2}$
ax.set_ylabel('$E$ [eV]')
plt.show()
from nonrad.elphon import get_Wif_from_wavecars
from nonrad.ccd import get_Q_from_struct
from nonrad.elphon import get_Wif_from_WSWQ
wavecars = []
for d in glob(str(cc_dir / 'ground' / '*')):
pd = Path(d)
Q = get_Q_from_struct(ground_struct, excited_struct, str(pd / 'CONTCAR'))
path_wavecar = str(pd / 'WAVECAR')
wavecars.append((Q, path_wavecar))
fig = plt.figure(figsize=(12, 5))
Wifs = get_Wif_from_wavecars(wavecars, str(ground_files / 'WAVECAR'), 324, [321, 322, 323], spin=1, fig=fig)
plt.tight_layout()
plt.show()
Hi, I am trying to compute Wif
with get_Wif_from_WSWQ
. However, I find that for some defect transitions the WSWQ element is not linear with Q, making it unlikely to use finite difference. I tested and find that this is not because of convergence (like cut off energy) or unreasonable displacements.
Could you please advice how to solve this issue? I wonder this may not be solved, rather it is due to the material itself.
Dear Altruists
Thank you very much for developing such a nice tool to calculate the SRH recombination coefficient. I found that the notebook of the 'nonrad' code shows how to calculate the hole capture coefficient for 'C' substitution at 'N' sites of 'GaN'. To calculate the SRH recombination coefficient (A), we would also need the electron capture coefficient as well.
In the case of the electron capture coefficient, the 'nonrad' paper suggests using 'dE=Eg-ε(0/-)'. I would like to know, to calculate the electron capture coefficient, is it sufficient to use only the 'dE=Eg-ε(0/-)' in the code of capture coefficient, or do I also need to calculate the electron-phonon coupling matrix element (WSWQ files) as well. If I need to calculate the WSWQ files, then should I calculate them in the excited states?
Thank you very much for your time and kind consideration.
Sincerely
Arindam Sannyal
Dear all developers or users:
Nonrad is a very powerful code. However, as I am a beginner with nonrad, I had some problems repeating the developer's tutorial.
As a rookie I have tried to repeat this literature "Nonrad: Computing nonradiative capture coefficients from first principles".
I calculated the Configuration Coordinate Diagram , the calculation results look consistent with the example.
When i calculate the Electron-Phonon Coupling Matrix Element,I found that a large error is produced. The graph I calculated is shown below.
The graph in the example is shown below.
The process of my calculations is
a. Copy the INCAR CONTCAR POTCAR KPOINTS WAVECAR calculated in the "C0" folder to the "WSWQ" folder created in all the folders under the "groud" folder;
b. Copy the calculated WAVECAR from all the "groud" folders into their respective "WSWQ" folders and rename them as WAVECAR.qqq;
c. Add ALGO=None and LWSWQ=.TRUE to INCAR and do a VASP calculation to get the WSWQ file.
The structure and calculation parameters used for the calculations were taken from https://nomad-lab.eu/. The version of VASP used is 5.4.4. I'm not quite sure if my calculation steps or parameters are correct.
I am wondering if someone could kindly share me the input files and the necessary information about it. I promise they will be used only for research purposed. If it's too much trouble, could anyone send me some relevant information?
Thank you very much for your kind consideration and I am looking forward to your early reply.
Best regards!
Changqing lin
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.