vibe-qcDocumentation

Electron transport through a hydrogen wire

This tutorial computes coherent transport through a ten-atom hydrogen wire held between two contacts. It walks through every step of a transport calculation in vibe-qc: the SCF, the partition into contacts and device, the transmission function, the conductance, current-voltage curves and the output files. The model is chosen to run in seconds, not to describe a real junction. The user guide has the formalism and the full API.

1. The SCF of the extended system

The calculation starts from the Kohn-Sham matrix of the whole system: the molecule plus the atoms that will serve as contacts. Here the first and last hydrogen atoms are the contacts and the eight atoms between them are the device.

import numpy as np
import vibeqc as vq
from vibeqc import transport as tr
from vibeqc.constants import HARTREE_TO_EV

chain = vq.Molecule([vq.Atom(1, [0.0, 0.0, 2.0 * i]) for i in range(10)])   # bohr
basis = vq.BasisSet(chain, "sto-3g")
opts = vq.RKSOptions()
opts.functional = "pbe"
scf = vq.run_rks(chain, basis, opts)
eps = np.asarray(scf.mo_energies)
print(f"E(PBE) = {scf.energy:.8f} Eh")
print("HOMO, LUMO (eV):", round(eps[4] * HARTREE_TO_EV, 3), round(eps[5] * HARTREE_TO_EV, 3))

This prints E(PBE) = -5.52725129 Eh and a HOMO and LUMO at -4.345 and -0.843 eV. The Fermi level is placed mid gap, \(E_F = (\varepsilon_\mathrm{HOMO} + \varepsilon_\mathrm{LUMO})/2 = -0.09534\) E\(_h\) (-2.59 eV).

2. The junction

junction = tr.Junction.from_result(scf, basis, left_atoms=[0], right_atoms=[9])
print(junction.device.size, f"{junction.discarded_coupling:.1e}")

The device holds the 8 AOs of the inner atoms. The partition drops the direct coupling between the two contact atoms, and here that coupling is \(1.7\times10^{-12}\) E\(_h\), so dropping it is safe.

The same partition of an RHF Fock matrix is refused. Exact exchange couples the two end atoms by \(2.5\times10^{-3}\) E\(_h\) although they are 18 bohr apart, and dropping that element would change the result. With Hartree-Fock or hybrid functionals, use a longer device.

3. Transmission and its resonances

A wide-band contact has a constant density of states \(\rho\) on its orbital: \(g = -i\pi\rho\). The coupling to the device then broadens every device level by \(\Gamma = 2\pi\rho\,|E S_{Dc} - H_{Dc}|^2\). Compare a strongly and a weakly coupled contact:

e_f = 0.5 * (eps[4] + eps[5])
energies = np.linspace(-0.6, 0.2, 1601)          # hartree
for rho in (1.0, 0.05):                          # states per hartree
    lead = tr.DOSContact([rho])
    t = tr.transmission(junction, lead, lead, energies, eigenchannels=True)
    g = tr.zero_bias_conductance(junction, lead, lead, e_f)
    print(f"rho = {rho}: G(E_F) = {g / tr.CONDUCTANCE_QUANTUM_S:.3e} G0")

contact DOS \(\rho\) (E\(_h^{-1}\))

\(G(E_F)\)

transmission peaks (eV)

1.0

0.862 \(G_0\)

-11.59, -10.42, -8.46, -5.67, -1.93, 3.10

0.05

\(4.57\times10^{-3}\ G_0\)

-11.61, -10.45, -8.46, -5.44, -1.16, 4.45

Weakly coupled contacts. The peaks sit on the eigenvalues of the isolated device, \(H_{DD} C = S_{DD} C \varepsilon\): -11.60, -10.45, -8.46, -5.45, -1.16 and 4.46 eV. Each peak is a resonant level that transmits almost fully (T = 0.88 to 1.0) over a narrow window. At the Fermi level, between two resonances, the electron tunnels, and the conductance is small.

Strongly coupled contacts. The resonances broaden until they overlap. The wire then transmits almost one channel at every energy, and the conductance at \(E_F\) approaches \(G_0\).

The two contacts are illustrations: a real electrode’s density of states and coupling come from the electrode itself, which is what the planned density-of-states contacts (TR-02) and principal-layer electrodes (TR-04) provide.

The transmission eigenvalues (t.eigenchannels) are bounded by 1. One orbital per contact gives a single channel, so \(T(E)\) never exceeds 1 here.

4. Current-voltage curves

for rho in (1.0, 0.05):
    lead = tr.DOSContact([rho])
    t = tr.transmission(junction, lead, lead, energies)
    iv = tr.iv_curve(t.energies, t, [0.5, 1.0, 2.0, 4.0], fermi_level=e_f, temperature=300.0)
    print(rho, [f"{i * 1e6:.3f}" for i in iv.current], "uA")

bias (V)

0.5

1.0

2.0

4.0

\(I\) for \(\rho = 1.0\) (µA)

33.34

66.41

129.85

239.04

\(I\) for \(\rho = 0.05\) (µA)

0.183

0.398

1.299

21.37

Strongly coupled contacts. The current is nearly ohmic: T is close to constant across the bias window, and \(I \approx G(E_F)\,V\).

Weakly coupled contacts. The current stays small until the window, \(E_F \pm eV/2\), reaches a resonance. At 4 V the window opens to \(\pm 2\) eV, and \(\mu_L = -0.59\) eV passes the device level at -1.16 eV, so the current jumps by an order of magnitude.

These curves use the rigid-shift approximation: one zero-bias transmission serves every bias. iv.bias_model records this. A self-consistent treatment recomputes the Hamiltonian in a field at every bias. vibe-qc has the field term (run_job(electric_field=...)); TR-02 will connect it to per-bias transmissions.

5. Files and plots

lead = tr.DOSContact([0.05])
t = tr.transmission(junction, lead, lead, energies)
iv = tr.iv_curve(t.energies, t, np.linspace(-4.0, 4.0, 81), fermi_level=e_f, temperature=300.0)
paths = tr.write_transport_output("h10_junction", t, iv, fermi_level=e_f, molecule=chain)
back = tr.read_transport_qvf(paths[".qvf"])
assert np.array_equal(back["transmission"].transmission, t.transmission)

The call writes these files:

  • h10_junction.out: the report, with references.

  • h10_junction.system: the zero-bias conductance in \(G_0\) and siemens, and the settings.

  • h10_junction.bibtex and h10_junction.references.

  • h10_junction.qvf: the structure and the x_vibeqc.transport.transmission and x_vibeqc.transport.iv sections, which read_transport_qvf restores exactly.

To draw the curves:

import matplotlib
matplotlib.use("Agg")
from vibeqc.transport.plot import iv_figure, transmission_figure

transmission_figure(t, fermi_level=e_f, log=True).savefig("h10_transmission.png")
iv_figure(iv).savefig("h10_iv.png")

What this calculation does not tell you

The method describes coherent elastic transport through Kohn-Sham levels:

  • PBE places the molecular levels too close to the Fermi level, so computed molecular conductances tend to be too high.

  • Vibrations, charging and heating are absent.

  • A single junction says nothing about the contact resistance of a macroscopic interface.

The useful comparisons are between junctions treated alike, for example two linkers or two contact geometries, and against another code at the same level of theory.