Dielectric tensor elements using Yambo

Deals with issues related to computation of optical spectra in reciprocal space: RPA, TDDFT, local field effects.

Moderators: Davide Sangalli, andrea.ferretti, myrta gruning, andrea marini, Daniele Varsano, Conor Hogan

Post Reply
Ehsanulazim
Posts: 12
Joined: Fri Nov 01, 2024 3:04 am

Dielectric tensor elements using Yambo

Post by Ehsanulazim » Mon Nov 03, 2025 5:40 pm

Hi,

I am wondering how to obtain the full dielectric tensor using Yambo. Normally, Yambo prints the dielectric function for a homogeneous material (e.g., bulk Au, graphene, bulk silicon), where the diagonal elements of the dielectric tensor — ε_xx, ε_yy, and ε_zz — are essentially identical (εxx= εyy= εzz), and the off-diagonal elements (ε_xy, ε_yx, ε_xz, ε_zx, ε_yz, ε_zy) are zero.

I have hands-on experience with such isotropic materials using Yambo. However, now I would like to study a material that exhibits anisotropic (magnetic) behavior, and therefore I need to extract all components of the dielectric tensor, including the off-diagonal ones.

From reading several Yambo forum posts regarding it, but still confused.
Can we obtain each tensor element by controlling the direction of the electric field using the LongDrXd keyword? For example:

% LongDrXd
1.000000 | 0.000000 | 0.000000 | # [Xd] [cc] Electric Field
%

Would the following correspond to each tensor component?

1.000000 | 0.000000 | 0.000000 | → εxx
0.000000 | 1.000000 | 0.000000 | → εyy
0.000000 | 0.000000 | 1.000000 | → εzz
1.000000 | 1.000000 | 0.000000 | → εxy
0.000000 | 1.000000 | 1.000000 | → εyz

Or, to obtain the off-diagonal elements, should we rotate the crystal orientation instead of changing the field direction?

I plan to use IP-RPA for this calculation.
Any guidance or suggestions would be greatly appreciated.

Thank you,
Ehsanul Azim
Master’s Student, Mechanical Engineering
University of Texas Rio Grande Valley (UTRGV)

User avatar
Daniele Varsano
Posts: 4285
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: Dielectric tensor elements using Yambo

Post by Daniele Varsano » Mon Nov 10, 2025 9:10 am

Dear Eshanul,

the LongDrXd variable control the diagonal element direction.

For calculating the off-diagonal elements, I suggest you to take a look at this tutorial:

https://wiki.yambo-code.eu/wiki/index.p ... err_effect

Best,

Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

Ehsanulazim
Posts: 12
Joined: Fri Nov 01, 2024 3:04 am

Re: Dielectric tensor elements using Yambo

Post by Ehsanulazim » Mon Nov 10, 2025 4:35 pm

Hi,

Thank you very much for your reply. As I mentioned magnetic material earlier, that’s why you might suggest to use yambo_kerr. However, after reading this post:
viewtopic.php?p=7429&hilit=Dielectric+t ... ents#p7429
I found that, Option 2 (six standard calculations) should also work in my case, since the off-diagonal part of the dielectric tensor is symmetric.

In that post, it is mentioned that:
“OPT 2
Alternatively, you can do six standard calculations with Yambo, specifying each time a different direction, and then reconstruct the whole dielectric tensor.
You will need (1,1,0), (1,0,1), (1,0,0), (0,1,1), (0,1,0), and (0,0,1). There are relations you can find in the literature.”
This part made me a bit confused. Should I use the LongDrXd variable or %BLongDir in this case?

For example, if I want to calculate ε_xy, what should be my LongDrXd or %BLongDir setting?
Would something like this be correct?

Code: Select all

%BLongDir
 1.000000 | 1.000000 | 0.000000 |   # [BSS] [cc] Electric Field 
%
Also, if I set it this way, will it give me ε_xy directly, or do I still need to use the relations mentioned in the post to reconstruct it?

Sorry for the repetitive questions, I couldn’t find any tutorial on it.

Thank you,
Ehsanul Azim
Master’s Student, Mechanical Engineering
University of Texas Rio Grande Valley (UTRGV)

User avatar
Daniele Varsano
Posts: 4285
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: Dielectric tensor elements using Yambo

Post by Daniele Varsano » Tue Nov 11, 2025 12:15 pm

Dear Ehsanul,

LongDrXd and BLongDir have the same meaning, but they are used in different contexts:

LongDrXd is meant for linear response calculation in reciprocal space
BLongDir is meant for a calculation in transition state (e.g. BSE)
Also, if I set it this way, will it give me ε_xy directly, or do I still need to use the relations mentioned in the post to reconstruct it?
You need to use the relation as mentioned in the post as the setting (1,1,0) will give you the diagonal element along the (1,1,0) direction.

Best,

Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

Post Reply