Simulation of THz-driven processes using LAMMPS¶
©️ Copyright 2025 @ Yao Wu
Author:
Yao Wu 📨
Date:2025-10-20
Lisence:This document is licensed under Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.
1 Introduction¶
This tutorial is to give a guideline to calculate THz-driven processes by using Lammps.
Terahertz (THz, 0.1~10 THz ) photons carry only a few millielectronvolts of energy (4.1 meV at 1 THz)—far below the band gaps, lattice-vibration phonon energies, or chemical-bond strengths of most materials. Consequently, THz light does not directly drive inter-band electronic transitions, yet it can resonantly couple to low-energy degrees of freedom such as phonons, free carriers, magnons, polarons, and superconducting gaps, thereby “gently” steering collective behavior far from equilibrium. In recent years, the peak power of THz sources (synchrotron radiation, ultrafast lasers, free-electron lasers, and intense-field THz generators) has surpassed GW cm⁻², giving rise to a wealth of novel condensed-matter phenomena.
The lammps simulation of terahertz does not directly introduce a light field. Instead, it adds an electric field in the shape of a THz Gaussian packet on the basis of the ordinary simulation. Since this band rarely involves electron transitions, only the ions can be applied with an electric field.
Below, we will take the simple BaTiO₃ (BTO) system as a test case and investigate its THz-driven processes.
2 Data preparation¶
Born effective charge calculation
Before applying the THz field, we need to compute the Born effective charges (Z* ) of the given system from DFT. For every ion, Z* is obtained by summing the appropriate tensor elements, weighted by the eigen-vector of the IR-active mode; this guarantees that the anions and cations carry equal and opposite charges, so that the unit cell remains neutral overall.
The basic input parameters in VASP are as follows, and those in other first-principles calculation software should be similar.
For simple systems such as BTO, the Born effective charge can be extracted through the following script:
After extraction, simply sum the principal diagonal components for each element and take the average—this gives the effective Born charge Z* used in the THz force calculation.
3 MD simulation via Lammps¶
The MD protocol should follow the same setup used for standard BaTiO₃ calculations, 10 * 10 * 10 supercell is used for simulation, Temperature T is set to 300 K.
As with most Lammps simulations, you need to provide:
- Structure model as input file;
- force-field model as input file;
- appropriate MD parametersls: time step, Tdamp, Pdamp, T, etc.
One of the critical part is the application of the force acting on the atoms. That is, the electric field is converted into a force acting on the atoms — obtained by multiplying the Born effective charge Z* with the instantaneous electric field E(t) to give F = Z·E(t) —— and applied as an additional force on the ions. For example, when an electric field of Et=1MV/cm is applied, the force is F = 0.01 * (Z).
Another critical part is the THz electric field itself must be properly defined. We use a set of variables to fully characterize the THz electric field:
- Peak amplitude (V Å⁻¹ – must be converted according to the chosen LAMMPS units);
- THz carrier frequency (determines the time between two successive field maxima);
- Single-pulse centre time t₀ (s);
- Pulse duration – Gaussian envelope standard deviation σ (s);
- Pulse interval – delay of 2 ps before the first pulse is fired (s);
- Total number of pulses to be delivered;
- Pulse counter – tracks how many pulses have already been applied.
These parameters together determine the shape and periodicity of the THz electric field which is corresponding to parameters in THz electric field is implemented as:
E(t)=Ef⋅exp[ −4 ln(2) (t−t₀)²/σ² ]⋅sin(2π⋅freq⋅t),
where
Ef– peak amplitude (V Å⁻¹);t₀– pulse center(ps);σ– full-width-at-half-maximum (FWHM) of the Gaussian envelope (ps);freq– carrier frequency (THz);t = (v_current_step - NSTEPS) * 1e-15(elapsed simulation time);countis used to apply multiple pulses.
The Gaussian term confines the sinusoid to a single THz pulse, and the prefactor 4ln(2) guarantees that σ is the FWHM.
Additionally, we introduce v_current_step to keep track of the current timestep — this variable is updated every step and used to compute the instantaneous THz field and apply the corresponding force. The fore is defined as:
It is recommended to adopt the settings illustrated in the accompanying input.lammps template below. These variable parameters also can be adjusted as needed.
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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | |
After this run you will obtain
log.300– LAMMPS log (thermo output)300trj.lammpstrj– corresponding trajectory file
The supercell volume and temperature written in log.300, as well as the position information stored in the .lammpstrj trajectory file, and polarization of different steps can be extracted automatically with the supplied parsing script from Li Denan's markdown.(https://github.com/MoseyQAQ/FerroDispCalc/tree/cpp).
Once we have saved the polarization data file (polar.dat), we can immediately use it for plotting.