Page 1 of 1

ndb.dip_iR_and_P fragments

Posted: Sat Aug 06, 2016 10:03 am
by vamshi.katukuri
Dear all,

I am trying to extract the dipole matrix elements for a particular set of bands. Going through the forum viewtopic.php?f=13&t=382&p=2621&hilit=dipole#p2621 , I understood that one can do that using the python script. However it seems to be for an older version of Yambo. Now I am trying to modify it to be compatible with the latest release. In Yambo 4.0.3 Revision 104, the ndb.dip_iR_and_P files are written in a separate folder (if -J option is used) outside the SAVE folder. Further the ndb.dip_iR_and_P is fragmented into several files, e.g, ndb.dip_iR_and_P_fragment_101. I am not able to understand how these fragments are connected and how one can combine all of them to get one ndb.dip_iR_and_P file. Any help will be appreciated.

Regards
Vamshi
PostDoc
Institute of Physics, EPF Lausanne

Re: ndb.dip_iR_and_P fragments

Posted: Sun Aug 07, 2016 11:12 am
by Daniele Varsano
Dear Vamshi,
yes, the script mentioned in the forum as you can see from the date of the post was quite old.
In Yambo 4.0.3 Revision 104, the ndb.dip_iR_and_P files are written in a separate folder (if -J option is used) outside the SAVE folder.
Ok, but this should not be a problem, you can copy, symlink or simply run without the -J option as you wish.

Further the ndb.dip_iR_and_P is fragmented into several files, e.g, ndb.dip_iR_and_P_fragment_101. I am not able to understand how these fragments are connected and how one can combine all of them to get one ndb.dip_iR_and_P file.
The number of the fragments are connected to the number of the K points, so you have a different file for any K point. If you want to avoid fragmentation you can try to add in your input file to add the line:

Code: Select all

DBsFRAGpm= "-DIP"  

pay attention to the minus sign. This variable appears when adding IO verbosity when building the input file "-V io". It should work but I never tried it.

If you update that python script and you will to share it, we will be happy to add it in the python yambo tool suite.

Best,
Daniele

Re: ndb.dip_iR_and_P fragments

Posted: Wed Aug 10, 2016 8:34 am
by Davide Sangalli
Dear Vamshi,
in the new ndb.dipoles the matrix elements DIP(3)_cvk\sigma are stored with the indexes running as follow
(first index run faster):
a) real, imaginary part
b) cartesian index (xyz)
c) conduction band index
d) valence band index
e) k-point index (if you fragment this index goes into the fragment index)
f) if n_sp_pol>1, spin index (if you fragment this index goes into the fragment index)

Hope it helps to upgrade the script.

Best,
D.