The codes developed in the group are hosted in GitHub.

**1. STM images, conductance plots and dI/dV maps****.- STMpw**

** **

Our awesome Tersoff and Hamann (TH) and Bardeen code based on planewave DFT calculations: **STMpw.f90**, you can download it from here: https://github.com/qphensurf/STMpw/releases

For VASP: STMpw for VASP

and for Quantum Espresso: *STMpw for Quantum Espresso*

The present version runs on converged results of the *VASP* and* Quantum Espresso* codes. It needs to have the POSCAR, OUTCAR and WAVECAR of the VASP run that has been converged with the option ISYM=0.

The code produces constant-current images as well as single-point dI/dV curves and dI/dV maps. The actual agreement between simulations and experiments is sometimes breathtaking, particularly after all the bashing that is usually done on DFT calculations.

A big problem of STM simulations based on supercell codes (typically planewave codes that use FFT in 3D) is the vacuum region. In order to simulate this region next to the surface of a slab mimicking the system of interest, a small vacuum region is usually left. This makes totally sense because wavefunctions are exponentially decaying in vacuum and it is maddening to try to reproduce them with finite sets of planewaves. A small vacuum region implies less planewaves because the density is never so small that a ridiculous number of planewave is needed. But this is bad when you are simulating STM images made by the tails of these wavefunctions in vacuum. Usually, you need the value of the wavefunction where the density coming from the ''back'' of the slab (that you do not want to have) is larger!

STMpw goes about this problem by realizing that each Fourier component of the wavefunction abides by a Schrödinger equation that is trivially solvable if the electron potential is constant. We can then write the ''exact'' solution of the wavefunction in the vacuum region that needs to match the correct DFT wavefunction in the slab. To do this we define a plane at a distance **z_s** from the surface where the slab solutions and the vacuum solutions are matched. The user only needs to give the code this distance, and the code runs. The distance should be chosen there where the density is still large enough to be accurate, but where it already corresponds to the vacuum solution. Our experience is that 2 Angströms beyond the last atom is excellent.

Once that we know the exact values of the wavefunctions there where the STM tip "lives", we can evaluate the STM image. To do this we apply either the Tersoff and Hamann approximation in its finite-bias extension (à la Norton Lang) or we do a full-fledged Bardeen approximation.

Figure: Test included in the distribution of STMpw.f90 (GitHub): This is an acetylene molecule (HCCH for the physicist among you) on a Cu (100) surface. This is a very simplified calculation where a 3x3 surface unit cell was used, 4 atomic layers to create the slab. The full cell is 7.524x7.524x21.282 Angströms^3 where the vacuum gap is 7.835 Angströms. The image has been produced using the Tersoff-Hamman approach integrating 0.5 eV from the Fermi energy. This would correspond to an image taken at 0.5 V, assuming that the Kohn-Sham eigenergies of the DFT calculation correspond to the one-electron energies of the experiment. The image (a) and the cut has been produced at a largish constant integrated local density of states, and the tip is fairly close to the molecule, but always above 2.5 Angströms from the H atoms. (b) is the profile along the cut plotted in (a). The image has been produced in a linux machine running wine and WSxM. A .prn file was saved and read using gimp to produce the above image. |

Some results obtained with STMpw.f90 can be checked in the following publications:

- Supramolecular chemistry based on 4-acetylbiphenyl on Au (111), Roberto Robles, Vladimir Zobac, Kwan Ho Au Yeung, Francesca Moresco, Christian Joachim, Nicolás Lorente,
*Physical Chemistry Chemical Physics*22, 15208 (2020). - Transmitting Stepwise Rotation among Three Molecule-Gear on the Au(111) Surface, Kwan Ho Au Yeung, Tim Kühne, Frank Eisenhut, Michael Kleinwächter, Yohan Gisbert, Roberto Robles, Nicolas Lorente, Gianaurelio Cuniberti, Christian Joachim, Gwénaël Rapenne, Claire Kammerer, and Francesca Moresco,
*The Journal of Physical Chemistry Letters*11, 6892, (2020). Electronic decoupling of polyacenes from the underlying metal substrate by sp

^{3}carbon atoms, Mohammed S. G. Mohammed, Luciano Colazzo, Roberto Robles, Ruth Dorel, Antonio M. Echavarren, Nicolás Lorente, and Dimas G. de Oteyza,*Communications Physics*3, 159 (2020).- Inducing Open-shell Character in Porphyrins through Surface-assisted Phenalenyl π-Extension, Qiang Sun, Luis M. Mateo, Roberto Robles, Pascal Ruffieux, Nicolas Lorente, Giovanni Bottari, Tomás Torres, and Roman Fasel,
*Journal of the American Chemical Society*142, 18109 (2020).

**2. Electron Spin Resonance simulations for the STM. TimeESR and Floquet codes.**

*almost*periodic:

*T*is the period of the drive. This reminds us of Bloch's theorem.

*and*periodic. Then you can use a Fourier transform for the rates and a Floquet transform (that uses the Fourier transform and then the above

*k*-points in the time Brillouin zone). This is how the Floquet code works that is particularly well suited for getting ESR spectra in continuous wave.

- Many-body nonequilibrium effects in all-electric electron spin resonance. Jose Reina-Gálvez, Christoph Wolf, and Nicolás Lorente. Phys. Rev. B 107, 235404 (2023)
- All-electric electron spin resonance studied by means of Floquet quantum master equations, Jose Reina-Gálvez, Nicolás Lorente, Fernando Delgado, and Liliana Arrachea, Phys. Rev. B 104, 245435 (2021)

**3. Shiba and Majora simulations: magnetic impurities on s-wave superconductors.**

We have developed a series of codes to explore the effect of magnetic impurities on s-wave superconductors. These codes are based on Nambu Green's functions that reproduce the Bogoliubov-de Gennes equations. The impurity enters via a Kondo Hamiltonian, in the classical spin limit. In this limit, the impurity is thought of as a local magnetic field. The effect is to weaken the superconductor's Cooper pairs and thus create one-particle states in the otherwise one-particle gap (the superconductor gap).

We can also do spin chains, adding a 1-D array of spins. We have solved the infinite limit (that allows us to do a topological-invariant analysis) as well as the finite-chain case.

These codes are in evolution with planned upgrades for d-wave superconductors, molecular impurities, and DFT-based description of the superconductor substrate thanks to our collaboration with Prof. Michael Flatté.

Some References:

- Moiré dispersion of edge states in spin chains on superconductors, Cristina Mier, Deung-Jang Choi, and Nicolás Lorente Phys. Rev. Research 4, L032010 (2022)
- Calculations of in-gap states of ferromagnetic spin chains on s-wave wide-band superconductors, Cristina Mier, Deung-Jang Choi, Nicolás Lorente, Phys. Rev. B 104, 245415 (2021)
- Atomic manipulation of in-gap states in the β−Bi2Pd superconductor,
Cristina Mier, Jiyoon Hwang, Jinkyung Kim, Yujeong Bae, Fuyuki
Nabeshima, Yoshinori Imai, Atsutaka Maeda, Nicolás Lorente, Andreas
Heinrich, and Deung-Jang Choi*, Phys. Rev. B 104, 045406 (2021)

** **

# 4. Kondo, non-equilibrium conductance and vibrations.

# Our non-equilibrium Green's function code using the NCA to account for the Kondo problem as well as self-consistent Born approximation for the excitation of local vibrations, allows us to compute the conductance of junctions where are a magnetic molecule is vibrationally excited. This code is flexible and allows us to understand the role of many-body interactions at low temperatures when vibrational excitation is within the typical energy scale of the transmitted electrons.

# Some References:

# The Kondo effect of a molecular tip as a magnetic sensor, Léo Garnier, Benjamin Verlhac, Paula Abufager, Nicolás Lorente, Maider Ormaza , and Laurent Limot, Nano Letters 20, 11, 8193 - 8199 (2020)

# Vibron-assisted spin excitation in a magnetically anisotropic molecule, N. Bachellier, B. Verlhac, L. Garnier, J. Zaldívar, C. Rubio-Verdú, P. Abufager, M. Ormaza, D.-J. Choi, M.-L. Bocquet, J. I. Pascual, N. Lorente & L. Limot, Nature Communications 11, 1619 (2020)