This is a collection of input files, output files, and scripts, which were used to produce all the computational results presented and discussed
in the following publication:

"All-optical control of second-harmonic generation in β-BaB2O4 via coherent, terahertz-driven acentric lattice displacement"
Flavio Giorgianni, Nicola Colonna, Gabriel Nagamine, Leonie Spitz, Guy Matmon, Alexandre Trisorio, Nicolas Forget, Carlo Vicario, Adrian Cavalieri 

Calculations were performed using Quantum ESPRESSO (QE) v6.3Max

The following codes of Quantum ESPRESSO were used:
pw.x         - used to compute the density-functional theory (DFT) ground state
ph.x         - used to compute the phonons and the dielectric tensor
dynmat.x     - used to diagonalize the dynamical matrix
projwfc.x    - used to compute projected density of states
pp.x         - used to dump on file the electronic charge density

Folder structure
.
├── DISPL
│   ├── charge_modulation				Folder with the charge density at different displacements (Fig. 4c)
│   │   └── l_XXX                                   	[for XXX in -1.0 0.0 1.0]
│   │       ├── BBO.pdos_atm#XXX(AAA)_wfc#YYY(ZZZ)  	Projected DOS for atom number XXX, atom type AAA, wavefunction number YYY angular quantum number ZZZ
│   │       ├── BBO.pdos_tot				Total projected DOS
│   │       ├── job.sh					Submission script
│   │       ├── plot_charge.in				Input file for pp.x to plot the charge density
│   │       ├── projwfc.in/out				Input/output of projwfc.x to compute pDOS
│   │       ├── pwnscf.in/out				Input/output of pw.x for the NSCF calculation
│   │       ├── pwscf.in/out				Input/output of pw.x for the SCF calculation
│   │       └── rho.cube				Charge density on a grid 
│   └── dielectric_tensor				Folder with dielectric tensor and refractive index calculation (Fig. 4a)
│       ├── atomic_pos_eq_ang.txt			Atomic position at equilibirum
│       ├── diag.py					Python script to diagonalize the dielectric tensor
│       ├── displ.txt					Atomic displacement associated to the relevant phonon
│       ├── generate.sh					Bash script to generate all the input files at different displacement strenght
│       ├── get_epsilon.sh				Bash script to exctract the dielectric matrix for all the displacement strenghts
│       ├── get_ref-index.sh				Bash script to compute the refractive index for all the displacement strenghts
│       ├── job.sh					Template for the sumbission script
│       ├── pwscf.in					Template for the input for the electronic SCF calculation
│       ├── phscf.in					Template for the input for the dielectric function calculation
│       └── l_XXX                                   	[for XXX in -1.00 ... 1.00]
│           ├── job.sh					Sumbission script 
│           ├── pwscf.in/out				Input/output for the electronic SCF calculation
│           └── phscf.in/out				Input/output for the dielectric function calculation
├── PHonons						Folder containing the phonon calculation 
│   ├── dynmat.in/out					Input/Output of dynamt.x for the diagonalization of the dynamical matrix
│   ├── BBO.dyn						Dynamical matrix at Gamma
│   ├── BBO_q110_displ					Phononic displacements at GAMMA with limit along the 110 direction
│   ├── BBO_q110_eig					Phononic eigenvectors at GAMMA with limit along the 110 direction
│   ├── dynmat_q110.axsf				Phonons displacement in a format suitable for Xcrysden
│   ├── IR_q110.dat					Infra-Red intensities (extracted from dynamt.out)
│   ├── phscf.in/out					Input/output for the phonon SCF calculation
│   └── pwscf.in/out					Input/output for the electronic SCF calculation
├── pseudo	                                        Folder containing the pseudopotentials
│   └── XXX_ONCV_PBE-1.2.upf				Pseudopotential for atom XXX
└── VC-RELAX						Folder with the geometry optimization
    ├── job.sh						Submission script
    └── pwscf.in/out					Input/output for the electronic SCF calculation