Dear Shimin,
So I checked and I think yambo is correctly computing the transition dipoles for both spin channels, even though in the database they are stored with the dimensions of the spin=0 case (i.e., 1242 valence bands instead of 1240 also for the spin=1 case). So for example the transition <1240|d|1241> should be correctly computed.
In order to show this, I have patched yambopy so that it can now read correctly the dipoles for an open-shell system (it was not supported before). In order to get it, you need to clone it from git following the "
Installation from latest patch" option on the wiki.
Let me discuss more in detail below in order to fully answer your question.
- The error when loading the databases with yambopy was due to the fact that in your calculation you had set more atomic types than you actually used: in particular, you had the "Zn1" type defined but not actually used in the atomic positions. Now yambopy can handle this case and opens the database correctly. Of course, the cleanest way would be to have the correct ntyp value in your input.
- For the dipoles, I patched the open-shell case. Yambopy by defaults restructures the dipoles array into a hermitian matrix Nbands x Nbands, where the diagonal blocks (corresponding to c->c' and v->v' transitions) are zero by construction, while the off-diagonal blocks contain the v->c transition amplitudes.
In the case of your system, if I plot a slice of the dipole matrix from states 1236 to 1246 for both spins I obtain the results below (showing the norm of the dipoles with only two significant digits):
Code: Select all
# Dipoles
# SPIN 0
# 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246
# 1236 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.04 0.13 0.34 0.73
# 1237 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.15 0.15 2.28 0.05
# 1238 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.01 0.09 2.11 0.65
# 1239 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.09 0.01 2.11 0.65
# 1240 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.59 0.59 0.49 0.86
# 1241 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.54 0.55 0.02
# 1242 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.54 0.00 0.55 0.02
# 1243 0.04 0.15 0.01 0.09 0.59 0.00 0.54 0.00 0.00 0.00 0.00
# 1244 0.13 0.15 0.09 0.01 0.59 0.54 0.00 0.00 0.00 0.00 0.00
# 1245 0.34 2.28 2.11 2.11 0.49 0.55 0.55 0.00 0.00 0.00 0.00
# 1246 0.73 0.05 0.65 0.65 0.86 0.02 0.02 0.00 0.00 0.00 0.00
# SPIN 1
# 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246
# 1236 0.00 0.00 0.00 0.00 0.00 0.35 0.52 1.37 0.02 0.01 0.03
# 1237 0.00 0.00 0.00 0.00 0.00 2.28 0.00 0.13 0.09 0.09 0.01
# 1238 0.00 0.00 0.00 0.00 0.00 2.09 0.67 0.06 0.02 0.03 0.08
# 1239 0.00 0.00 0.00 0.00 0.00 2.09 0.67 0.06 0.03 0.02 0.08
# 1240 0.00 0.00 0.00 0.00 0.00 0.34 0.84 0.13 1.10 1.10 0.12
# 1241 0.35 2.28 2.09 2.09 0.34 0.00 0.00 0.00 0.00 0.00 0.00
# 1242 0.52 0.00 0.67 0.67 0.84 0.00 0.00 0.00 0.00 0.00 0.00
# 1243 1.37 0.13 0.06 0.06 0.13 0.00 0.00 0.00 0.00 0.00 0.00
# 1244 0.02 0.09 0.02 0.03 1.10 0.00 0.00 0.00 0.00 0.00 0.00
# 1245 0.01 0.09 0.03 0.02 1.10 0.00 0.00 0.00 0.00 0.00 0.00
# 1246 0.03 0.01 0.08 0.08 0.12 0.00 0.00 0.00 0.00 0.00 0.00
As you can see, in the SPIN-0 case we see that the occupied/valence block ends correctly at 1242, while in the SPIN-1 case it ends at 1240. In particular, for the SPIN-1 case, we have nonzero values for the transition dipole |<1240|d|1241>|=0.34 (and more in general the rows 1241 and 1242 are nonzero). This for me shows that everything is working fine, but of course please check carefully that the results are what you expect.
I attach the script I used to get this file just in case you need it.
Cheers,
Fulvio
You do not have the required permissions to view the files attached to this post.
Dr. Fulvio Paleari
S3-CNR Institute of Nanoscience and MaX Center
Modena, Italy