## Where is oscillator strength computed in Yambo

Various technical topics such as parallelism and efficiency, netCDF problems, the Yambo code structure itself, are posted here.

### Where is oscillator strength computed in Yambo

Hi developers,

I would like to use the term $\rho_{n,m}(k,q,G) = \braket{n k| e^{i(q+G)\cdot r}|m (k-q)}$
for some other computations. Can I find out if this term is computed directly in the code and whether
it is possible to write it as output?

Austin
Austin Liu
Bernardi Group, California Institute of Technology
liuyuaustin

Posts: 8
Joined: Thu Aug 10, 2017 8:34 pm

### Re: Where is oscillator strength computed in Yambo

Dear Austin,
the rho_{nmk}(q+G) are computed by the subroutine
Code: Select all
src/wf_and_fft/scatter_Bamp.F

which takes in input the indexes (n,i_k,i_symm,i_sp_pol) and (m,ip_k,ip_symm,ip_sp_pol)
The i_k index belongs to the IBZ, while i_symm index is the symmetry relating i_k to i_k_bz in the full BZ.
Same for ip_k, ip_symm and ip_k_bz.
The relation k_bz-kp_bz=q holds

For how scatter_Bamp is used see the subroutine
Code: Select all
src/pol_function/X_irredux_residuals.F

Best,
D.
Davide Sangalli, PhD
CNR-ISM, Division of Ultrafast Processes in Materials (FLASHit) and MaX Centre
http://www.ism.cnr.it/en/davide-sangalli-cv/
http://www.max-centre.eu/

Davide Sangalli

Posts: 314
Joined: Tue May 29, 2012 4:49 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy

### Re: Where is oscillator strength computed in Yambo

Thank you very much,
Austin
Austin Liu
Bernardi Group, California Institute of Technology
liuyuaustin

Posts: 8
Joined: Thu Aug 10, 2017 8:34 pm

### Re: Where is oscillator strength computed in Yambo

Dear developers,

I found this previous discussion on the computation of the oscillators and wanted to ask if it is still up to date. viewtopic.php?f=10&t=61

Thanks,
Austin
Austin Liu
Bernardi Group, California Institute of Technology
liuyuaustin

Posts: 8
Joined: Thu Aug 10, 2017 8:34 pm

### Re: Where is oscillator strength computed in Yambo

Yes it is.
You may find just few minor technical changes in the source code due to optimization.

Best,
D.
Davide Sangalli, PhD
CNR-ISM, Division of Ultrafast Processes in Materials (FLASHit) and MaX Centre
http://www.ism.cnr.it/en/davide-sangalli-cv/
http://www.max-centre.eu/

Davide Sangalli

Posts: 314
Joined: Tue May 29, 2012 4:49 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy

### Re: Where is oscillator strength computed in Yambo

Dear developers,

I wanted to ask that it is appropriate to convert the ig index (e.g. in isc%rhotw(ig), where isc is of type elemental_collision in mod_collision_el.F) to the corresponding G-vector by
using the table g_vec(g_rot(is,ig),:) (as mentioned in the tutorial , and where i_s=i_k_s if the indices given to isc are isc%is = (/i_n,i_k,i_k_s,i_k_sp/), isc%os = (/i_np,i_kmq,i_kmq_s,i_kmq_sp/).

Thanks,
Austin
Austin Liu
Bernardi Group, California Institute of Technology
liuyuaustin

Posts: 8
Joined: Thu Aug 10, 2017 8:34 pm

### Re: Where is oscillator strength computed in Yambo

Dear Austin,

when you want the oscillator strength in between (i_n,i_k) and (o_n,o_k) (band and k-point indexes)
yambo will compute in isc%rhotw(ig) for each g-vector. The corresponding g-vector would trivially be g_vec(ig,:)
This is all you need.

So why the grot in scatter_Bamp ... Some more explanation.
If you do a calculation without symmetries yambo just directly computes.
Remember you can always remove all the symmetries from the systems using ypp -y and uncommenting the flag RmAllSymm in the input.

Instead if you want to work with symmetries .. it is a bit more complicated.
The point is that now the k-points (i_k and o_k) maybe out of the IBZ and even out of the first BZ (since you reach o_k adding q to i_k),
so that you do not have the WFs. What yambo will do is to take the WFs of the corresponding k in the IBZ and rotate the to the BZ (WF_apply_symm)
However this is not all. if you are even out of the first-BZ there is even a shift of a G-vector to take into account.
Moreover isc%rhotw is evaluated for specific e^{i(G-G0} and one needs to keep track of all this symmetry operations.
This is where grot enters in place, rotating g according to the correct symmetry "i_qs".
Without some math it is very confused, but if you try you should be able to derive all the needed expressions.

D.
Davide Sangalli, PhD
CNR-ISM, Division of Ultrafast Processes in Materials (FLASHit) and MaX Centre
http://www.ism.cnr.it/en/davide-sangalli-cv/
http://www.max-centre.eu/

Davide Sangalli

Posts: 314
Joined: Tue May 29, 2012 4:49 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy

### Re: Where is oscillator strength computed in Yambo

Hi Davide,

Thanks for the reply, I will work through it again. I'd like to eventually use all symmetries to reduce the computational time but will work through it without symmetries as well.

Austin
Austin Liu