Skip to content
Agentmart
Submit a tool

mat-edi-mobility

Compute defect-limited carrier mobility and electron-defect scattering matrix elements in 2D and 3D semiconductors from first principles with Quantum ESPRESSO…

Skill by learningmatter-mit

IndexedMIT★ 183
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/learningmatter-mit-mat-edi-mobility

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Compute defect-limited carrier mobility and electron-defect scattering matrix elements in 2D and 3D semiconductors from first principles with Quantum ESPRESSO and the EDI plugin.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/mat-edi-mobility

What's inside

Skill name
mat-edi-mobility
Description
Compute defect-limited carrier mobility and electron-defect scattering matrix elements in 2D and 3D semiconductors from first principles with Quantum ESPRESSO and the EDI plugin.
License
MIT
Instructions
342 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (20)

  • SKILL.md
  • README.md · examples/mos2-s-vacancy/
  • mos2_monolayer.cif · examples/mos2-s-vacancy/
  • reference_mos2_transport.dat · examples/mos2-s-vacancy/
  • edi_direct.in · resources/inputs/
  • edi_setup.in · resources/inputs/
  • edi_transport.in · resources/inputs/
  • extract_pot.in · resources/inputs/
  • kf.dat · resources/inputs/
  • ki.dat · resources/inputs/
  • nscf_primitive.in · resources/inputs/
  • scf_defect_super.in · resources/inputs/
  • scf_primitive.in · resources/inputs/
  • scf_pristine_super.in · resources/inputs/
  • compare_edmat.py · scripts/
  • compare_reference.py · scripts/
  • gen_kgrid.py · scripts/
  • parse_edmat.py · scripts/
  • parse_inv_tau.py · scripts/
  • parse_transport.py · scripts/

SKILL.md (first lines)

# mat-edi-mobility

## Goal
To compute the point-defect-limited carrier mobility $\mu(T)$ of a semiconductor
and the underlying electron-defect scattering matrix elements
$M(\mathbf{k}_i, \mathbf{k}_f) = \langle \psi_{\mathbf{k}_i} | \Delta V | \psi_{\mathbf{k}_f} \rangle$
from first principles, using the supercell difference-potential method of the
Quantum ESPRESSO + EDI pipeline. Here $\Delta V = V_{\text{defect}} - V_{\text{pristine}}$
is the Kohn-Sham perturbation potential of an isolated point defect, extracted as
the difference between the potentials of a defect-containing supercell and a
pristine supercell. The matrix elements are computed on a coarse k-grid,
transformed to a maximally localized Wannier basis $M(\mathbf{R}, \mathbf{R}')$,
and interpolated onto dense fine grids. The state-resolved scattering rate follows
from Fermi's golden rule,

$$\frac{1}{\tau_{n\mathbf{k}}} = \frac{2\pi}{\hbar}\, n_{\text{d}}\, \frac{1}{N_{\mathbf{k}}} \sum_{m,\mathbf{k}'} |M_{n\mathbf{k}, m\mathbf{k}'}|^2\, \delta(\varepsilon_{n\mathbf{k}} - \varepsilon_{m\mathbf{k}'}),$$

and the mobility from the linearized Boltzmann transport equation in the
self-energy (SERTA) and momentum (MRTA) relaxation-time approximations. The three
first-class outputs are the **direct** matrix elements $M$ on the coarse grid, the
**Wannier-interpolated** $M$ on a fine k-path, and the final mobility $\mu(T)$.

## Background
Defect-limited transport requires $M(\mathbf{k}_i, \mathbf{k}_f)$ on k-grids far
denser than any tractable supercell calculation can supply. EDI solves this the
way EPW solves the electron-phonon problem: compute $M$ directly on a coarse grid
commensurate with the supercell, rotate into a Wannier basis where
$M(\mathbf{R}, \mathbf{R}')$ decays rapidly with $|\mathbf{R}|$ and $|\mathbf{R}'|$,
and interpolate to $300\times300$ or denser at negligible cost. The scattering
rate scales linearly with the defect concentration $n_{\text{d}}$ (dilute,
incoherent-defect limit), so **the mobility scales as $1/n_{\text{d}}$ and the
concentration must always be reported alongside $\mu$**. For 2D materials the
pristine and defect supercells are computed independently, so their electrostatic
potentials carry an arbitrary offset that must be removed by vacuum-level
alignment (`pot_align = 'vacuum'`).

This skill is the defect-scattering companion to
[mat-epw-mobility](../mat-epw-mobility/SKILL.md), which computes the
*phonon*-limited mobility. At finite temperature the two channels combine by
Matthiessen's rule, $1/\mu_{\text{total}} = 1/\mu_{\text{phonon}} + 1/\mu_{\text{defect}}$.
Defect *energetics* (formation energies, charge states) that set which defects
dominate come from
[mat-defect-energy](../mat-defect-energy/SKILL.md); the AMSET route in
[mat-dft-electronic-transport](../mat-dft-electronic-transport/SKILL.md) is an
alternative phonon-limited channel.

### External binary: building Quantum ESPRESSO 7.5 + EDI
EDI is an **in-tree plugin** of Quantum ESPRESSO, not a standalone code: it links
QE's compiled static libraries and must be built against a matching QE version.

1. Obtain QE 7.5 (GitLab tag archive; no ReleasePack is required —
   `make w90` auto-fetches the pinned Wannier90 submodule even from a tarball) and
   configure it.
2. Clone EDI into the QE root and build:

   ```bash
   # Requires: Quantum ESPRESSO 7.5 + EDI (external MPI build)
   cd <QE-root>
   make pw
   make w90
   git clone https://github.com/yuanyue-liu-group/EDI edi-code
   cd edi-code && make
   ```

   This produces `src/edi.x` (MPI) and `src/extract_pot.x` (serial).
3. **gfortran patch (required for GCC builds):** `ed_coarse.f90` contains lines up
   to 158 characters, so add long-line support to `edi-code/src/makefile` after the
   `include` line:

   ```make
   F90FLAGS += -ffree-line-length-none
   FFLAGS   += -ffree-line-length-none
   ```

4. **`extract_pot.x` segfault patch (required):** `extract_pot.f90` calls
   `clean_pw(.TRUE.)` at line 77, before any `read_file`, which segfaults on a
   fresh process. Comment it out (or delete that line) and rebuild:

   ```fortran
   ! CALL clean_pw(.TRUE.)   ! upstream bug: runs before any read_file, segfaults
   ```

Pseudopotentials for the worked example are PseudoDojo NC-SR v0.5 PBE **stringent**
(`https://www.pseudo-dojo.org/pseudos/nc-sr-05_pbe_stringent_upf.tgz`); the Mo and
S UPFs are used as `Mo.upf` and `S.upf`. QE 7.5 must be built with Wannier90.

## Instructions

> [!IMPORTANT]
> Quantum ESPRESSO (`pw.x`) and EDI (`edi.x`, `extract_pot.x`) are external
> compiled MPI binaries, exactly as VASP is in
> [mat-dft-vasp](../mat-dft-vasp/SKILL.md). This skill targets a source build of
> **QE 7.5 + EDI v2.0** (repo `main` @ `41fed72`) with **PseudoDojo NC-SR v0.5 PBE stringent**
> pseudopotentials. The `venv/run cpu` commands apply only to the Python
> parser scripts. Reference input decks for every step are in
> [`resources/inputs/`](resources/inputs/). Replace `<ranks>` with your MPI rank
> count; `mpirun -np` and `srun -n` are interchangeable. Set `pseudo_dir` in each
> deck to your UPF directory (the decks use `./pseudo/`).

The pipeline is a DAG. The two supercell SCFs (step 3) are independent of the
primitive cell and of each other and can run in parallel. Steps 5 and 6 must run
in order (6 reads the Wannier archive written by 5).

### 1. Primitive-cell SCF
Compute the ground-state charge density of the pristine primitive cell.
`assume_isolated = '2D'` truncates the out-of-plane Coulomb tail and **must** be
consistent across every calculation. Deck:
[`resources/inputs/scf_primitive.in`](resources/inputs/scf_primitive.in).

```bash
# Requires: Quantum ESPRESSO 7.5 + EDI (external MPI build)
mpirun -np <ranks> pw.x -nk <pools> < scf_primitive.in > scf_primitive.out
```

Confirm `convergence has been achieved`.

### 2. Primitive-cell NSCF on the explicit coarse grid
Produce the Bloch states EDI folds into Wannier functions. The grid **must be an
explicit `K_POINTS crystal` list** (never `automatic`) and its dimensions **must

From learningmatter-mit/AtomisticSkills, MIT.

More from learningmatter-mit/AtomisticSkills

Compare and alternatives

    Featured in

    Signals

    Stars
    183
    Forks
    31
    Open issues
    0
    Last commit (this folder)
    Oct 5, 2026 (22 days ago)
    Last release
    Oct 6, 2026 (21 days ago)

    From GitHub (fetched Oct 24, 2026).

    Details

    License
    MIT
    First seen
    Oct 24, 2026
    Last checked
    Oct 24, 2026

    More from learningmatter-mit

    Cite this page

    mat-edi-mobility skill. Agent Mart. https://agentmart.dev/skills/learningmatter-mit-mat-edi-mobility (last updated 2026-10-24)