Skip to content

Calculate the Dielectric Tensor

1. Introduction

Calculate the frequency-dependent optical dielectric function ε(ω) of a material in the independent-particle approximation in Quantum ESPRESSO, with or without a relaxation first.

2. Open the notebook

In JupyterLite, the notebook is made/workflows/dielectric_tensor.ipynb, entry 8.2.1 "Dielectric tensor calculation" of made/workflows/Introduction.ipynb.

3. Set the parameters

Cell 1.2 holds the material, workflow and compute parameters:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from datetime import datetime
from mat3ra.ide.compute import QueueName

# 2. Auth and organization parameters
ORGANIZATION_NAME = None

# 3. Material parameters
FOLDER = "../uploads"
MATERIAL_NAME = "Silicon"  # small primitive cell (FCC, mp-149); NC pseudopotential available

# 4. Workflow parameters
WORKFLOW_SEARCH_TERM = "dielectric_tensor.json"
APPLICATION_NAME = "espresso"
MY_WORKFLOW_NAME = "Dielectric Function"

# Model parameters
MODEL_SUBTYPE = "gga"  # "gga" or "lda"

# 5. Compute parameters
CLUSTER_NAME = None  # specify full or partial name i.e. "cluster-001" to select
QUEUE_NAME = QueueName.D
PPN = 1

# 6. Job parameters
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M")
POLL_INTERVAL = 30  # seconds

The overview explains the account, material, workflow, compute and job parameters.

Cell 1.3 holds the method, k-grid and energy grid parameters:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Method parameters
# NOTE: epsilon.x (used to compute the dielectric function) does NOT support
# ultrasoft or PAW pseudopotentials -- norm-conserving ("nc") is required.
PSEUDOPOTENTIAL_TYPE = "nc"  # "nc" (norm-conserving) -- required; "us"/"paw" will fail
FUNCTIONAL = "pbe"           # for gga: "pbe", "pbesol"; for lda: "pz"

# Relax the structure before computing the dielectric response. Recommended for
# any material not already at its equilibrium geometry (e.g. Graphene / 2D).
ADD_RELAXATION = False

# Electronic k-grids; if None, the workflow default is used
RELAXATION_KGRID = None  # e.g. [8, 8, 8]  (used only when ADD_RELAXATION)
SCF_KGRID = None         # e.g. [8, 8, 8] (3D) or [12, 12, 1] (2D)
# The NSCF step recomputes the full (non-symmetry-reduced) k-mesh that epsilon.x
# integrates over; for a converged dielectric function it should be at least as
# dense as, and typically denser than, the SCF grid (e.g. [16, 16, 16]).
NSCF_KGRID = None       # e.g. [16, 16, 16] (3D) or [24, 24, 1] (2D)

# Energy cutoffs (raise for harder cases -- e.g. 60 / 480 for Graphene)
ECUTWFC = 40
ECUTRHO = 200

# epsilon.x energy grid (all values in eV)
ENERGY_GRID_MIN = 0.0     # wmin
ENERGY_GRID_MAX = 15.0    # wmax
ENERGY_GRID_POINTS = 500  # nw
INTERSMEAR = 0.2   # Lorentzian broadening between bands (eV)
INTRASMEAR = 0.0   # Drude-like intraband broadening (eV); set > 0 for metals
ENERGY_GRID_SHIFT = 0.0   # rigid shift of the energy grid (eV)

PSEUDOPOTENTIAL_TYPE has to be "nc", since epsilon.x does not support ultrasoft or projector augmented wave pseudopotentials. NSCF_KGRID is the grid epsilon.x integrates over; the comment recommends one at least as dense as SCF_KGRID. ENERGY_GRID_MIN, ENERGY_GRID_MAX and ENERGY_GRID_POINTS set the energy grid of ε(ω) in eV, INTERSMEAR the broadening between bands, INTRASMEAR the intraband broadening, set above zero for metals, and ENERGY_GRID_SHIFT a rigid shift of the grid.

The overview explains the model, k-point and cutoff and engine input parameters.

4. Run and read the result

Run the notebook with Run > Run All and log in when it asks, as in Authentication in JupyterLite.

After the job finishes, section 8 plots the real and imaginary parts of the dielectric tensor.

5. Interactive JupyterLite notebook

The interactive JupyterLite notebook for calculating the dielectric function can be accessed below.

Optical Properties with Optimal Basis Functions calculates the dielectric function from the web interface.