QuantumLab-ZY / HamEPC

A machine learning workflow for calculating the electron-phonon coupling (EPC)
MIT License
15 stars 3 forks source link

HamEPC

Electron-phonon coupling (EPC) calculator based on HamGNN

Table of Contents

  1. Introduction
  2. Requirements
  3. Installation
  4. GradMat Preparation
  5. Usage
  6. Theory
    1. Smearing Function
    2. Scattering Rate in Polar Materials
    3. Monte Carlo Sampling
    4. Band Velocity
  7. Explanation of Input Parameters
    1. basic
    2. advanced
    3. dispersion
    4. phonon
    5. epc
    6. transport
    7. mobility
    8. superconduct
  8. Code contributors
  9. Project leaders

Introduction

HamEPC is a machine learning workflow that leverages the HamGNN framework to efficiently calculate the electron-phonon coupling (EPC). By utilizing atomic orbital-based Hamiltonian matrices and gradients predicted by HamGNN, HamEPC is able to significantly accelerate EPC calculations compared to traditional density functional perturbation theory (DFPT) methods. HamEPC can be employed to evaluate important materials properties, including the electron-phonon coupling matrix, carrier mobility, and superconducting transition temperature. The script EPC_calculator.py defines EPC_calculator class which is used to calculate the epc-related properties. This script also needs HamGNN to predict the Hamiltonian matrix of a system.

Requirements

The following Python libraries are required to calculate the epc values:

Installation

Run the following command to install HamGNN:

git clone https://github.com/QuantumLab-ZY/HamEPC.git
cd HamEPC
python setup.py install

Warning!!!

When preparing the input data for HamEPC, it's important to ensure that the same primitive cell is utilized for the phonon spectrum, grad_data.npz, and grad_mat.npz. Specifically, the atomic coordinates, lattice parameters, and lattice directions should be consistent across these files. We apologize for any inconvenience this requirement may cause.

GradMat Preparation

Before running HamEPC to calculate EPC-related properties, mat_info_rc.npy should be generated by:

python perturb_supercell.py

and there are some variables need to be changed in perturb_supercell.py by user before running it:

And then, you need to predict the hamiltonians of those perturbed supercells through HamGNN. After that, grad_mat.npy should be generated by:

python grad_mat_prep.py

and also there are some variables need to be changed before running.

Usage

HamEPC supports hybrid parallelization of MPI and OpenMP. Users need to set the number of processes and threads reasonably in order to achieve optimal parallel efficiency and memory utilization.

mpirun -np ncores HamEPC --config EPC_input.yaml

Theory

Smearing Function

We use some smearing methods to approximate the delta function.

Scatteirng Rate in Polar Materials

For mobility calculation in polar materials, we divide the electron-phonon coupling term into two parts using the method in Phys. Rev. B 94, 20 (2016):

$$ {g}{mn\nu}\left ( \mathbf{k}, \mathbf{q} \right ) = {g}^{\mathrm{S}}{mn\nu}\left ( \mathbf{k}, \mathbf{q} \right ) + {g}^{\mathrm{L}}_{mn\nu}\left ( \mathbf{k}, \mathbf{q} \right ) $$

Then, we can split scattering rate into two parts, as: $$\left [ \frac{1}{\tau} \right ]{\mathrm{Polar} } = \frac{2\pi}{\hbar} \sum{\mathbf{q} m\nu } {\left | {g}^{\mathrm{L}}{mn\nu}\left ( \mathbf{k}, \mathbf{q} \right ) \right | }^{2} F{mn\nu}\left ( \mathbf{k}, \mathbf{q} \right )$$

$$\left [ \frac{1}{\tau} \right ]{\mathrm{Remainder} } = \frac{2\pi}{\hbar} \sum{\mathbf{q} m\nu } \left ( {\left | {g}{mn\nu}\left ( \mathbf{k}, \mathbf{q} \right ) \right | }^{2} - {\left | {g}^{\mathrm{L}}{mn\nu}\left ( \mathbf{k}, \mathbf{q} \right ) \right | }^{2} \right ) F_{mn\nu}\left ( \mathbf{k}, \mathbf{q} \right )$$

When polar_split = 'polar', the code will calculate the polar part of the scattering rate, and when polar_split = 'rmp', the code will calculate the remainder part. In addition, when polar_split = 'none', the code will calculate the scattering rate without spliting it into two parts.

Monte Carlo Sampling

To ensure the effective convergence of the integration results on the $\mathbf{q}$ grid, we also employ Monte Carlo integration with importance sampling.

Band Velocity

For read_momentum = True, we calculate the band velocity of electrons using: $$ \mathbf{v}{\mathbf{k}n,\alpha} = \frac{1}{\hbar} \frac{d\epsilon{\mathbf{k}n}}{d\mathbf{k}\alpha} = \frac{1}{\hbar} \langle n\mathbf{k} | \frac{dH\mathbf{k}}{dk\alpha} - \epsilon{\mathbf{k}n}\frac{dS\mathbf{k}}{dk\alpha} | n\mathbf{k} \rangle $$

For read_momentum = False, we calculate the band velocity of electrons using:

$$ \mathbf{v}{\mathbf{k}n,\alpha} = \langle n\mathbf{k} | p\alpha | n\mathbf{k} \rangle $$

Explanation of Input Parameters

To use this program, you should first set all the parameters in the basic block and then set the other blocks according to the required functionality.

basic:

advanced:

dispersion:

phonon:

epc:

transport:

mobility:

superconduct:

Code contributors:

Project leaders: