Step-by-step Quantum ESPRESSO inputs for bulk 2H-MoS2 (6 atoms, hexagonal cell): structural relaxation, electronic band structure, density of states, and Γ-point phonons. Each step has its input file, the output it produced, and a SLURM script.
The newer parts (Phonon_Dispersion_D3/, Hybrid_HSE06/, Electronic_properties/5-PDOS/) are hands-on exercises: they give the inputs and explain each step, but not the outputs. Run them yourself and check your results against the notes in each README.
A VASP version of the PBE vs HSE06 band-structure comparison for the same crystal is in VASP_Tutorial.
Electronic_properties/
├── 1-Relax/ relax ionic relaxation (pw.x)
├── 2-Nscf/ nscf non-self-consistent run on a 12×12×12 k-mesh (pw.x)
├── 3-Bands/ bands band structure on 113 k-points along a high-symmetry path (pw.x)
├── 4-plotbands/ bands.x bands → MoS2-2H.bands.dat(.gnu), bands.xmgr, plot_bands.py
└── 5-PDOS/ nscf + projwfc.x orbital-projected DOS (tetrahedra), plot_pdos.py
Phonon_Calculations/
├── 1-relax/ vc-relax cell + ionic relaxation (pw.x)
├── 2-scf/ scf + dos.x SCF on a 16×16×8 k-mesh, electronic DOS, plotdos.py
├── 3-phonon/ ph.x phonons at Γ (DFPT) → mos2.dyn
└── 4-dynmat/ dynmat.x Γ-point mode frequencies and eigenvectors (dynmat.axsf, dynmat.mold)
Phonon_Dispersion_D3/ full phonon dispersion with PBE+D3: vc-relax → scf + d3hess.x → ph.x on a q-grid → q2r.x → matdyn.x
Hybrid_HSE06/ PBE vs HSE06 band gap on the same cell
pseudo/ the two pseudopotentials used everywhere
See the README in each new folder for what every step does and what to check.
| Electronic_properties | Phonon_Calculations | |
|---|---|---|
| Functional / pseudopotentials | PBE, FHI norm-conserving (S.pbe-mt_fhi.UPF, Mo.pbe-mt_fhi.UPF) |
same |
ecutwfc |
37 Ry | 50 Ry (ecutrho 250 Ry in SCF) |
| k-mesh | 12×12×2 (relax), 12×12×12 (nscf) | 12×12×6 (vc-relax), 16×16×8 (scf) |
| Smearing | 0.005 Ry | Fermi–Dirac, 0.005 Ry |
| van der Waals correction | none (vdw_corr is commented out) |
none |
| QE version in the outputs | 5.2.0 | 6.2 |
Run the steps in order inside each folder. Every step reads the out/ directory written by the step before it.
- The pseudopotentials are in
pseudo/, and every input points to it (pseudo_dir = '../../pseudo'). The.sbatchfiles find the QE executables withcommand -v pw.x, so load your QE module first, and adjust cores and time limits for your cluster. - Submit each step with
sbatch run.sbatch(orrelax.sbatch,scf.sbatch, …). - Plot the bands with
python plot_bands.pyin4-plotbands/(readsMoS2-2H.bands.dat, in eV), or usebands.xmgr(xmgrace). Note thatMoS2-2H.bands.dat.gnuwas written by an oldbands.xin Ry. - Plot the DOS with
python plotdos.pyin2-scf/. It reads the Fermi energy from the header ofmos2.dos.
Check these before using the old inputs as a reference:
- Γ-point phonons are not converged.
Phonon_Calculations/4-dynmat/mos2.dynmat.outlists an imaginary mode at −105 cm−1. It stays after switching to the correct acoustic sum rule (below), so it comes from the phonon run itself: the SCF usedconv_thr = 1e-8, and the cell has no van der Waals correction.Phonon_Dispersion_D3/shows a converged setup. - No van der Waals correction. PBE alone does not bind the MoS2 layers properly, so the c-axis is too long (14.88 Å in
Electronic_properties). This also opens the band gap:plot_bands.pygives 1.52 eV (Γ → K) for that cell, while PBE on the PBE+D3 cell (c = 12.36 Å) gives about 0.93 eV (Hybrid_HSE06/1-scf-pbe, 6×6×2 k-grid).Phonon_Dispersion_D3/andHybrid_HSE06/use the PBE+D3 cell.
Fixed in the current version:
mos2.dynmat.inusedasr = 'zero-dim'(for molecules). It now usesasr = 'crystal', and the outputs in4-dynmat/were regenerated.1-Relax/run.sbatchread a file name that did not exist; the input names in all scripts now match.- The title line of
mos2.ph.insaid MoTe2.
The original calculations in Electronic_properties/ and Phonon_Calculations/ (2017–2018, QE 5.2.0 and 6.2) were run by Danny Rehn (@rehnd); the outputs still show his pseudopotential paths.