Pressure applied DFT calculations in Quantum ESPRESSO

I am trying to perform the pressure-induced DFT calculations in Quantum ESPRESSO. For this, I have calculated the lattice constant of the cubic structure by vc-relax calculation. Then I tried to reduce to lattice constant slightly (say 5%,10%) keeping the other parameters constant to see how reducing the lattice constants affects the band structure of the crystal.

Doubts:

As far as I understand, reducing the lattice constant will have the same effect as applying the external pressure on the crystal. Am I thinking it correctly in view of DFT calculations or there is already provided executables in Quantum ESPRESSO to perform pressure applied DFT calculations on a given system?

Also when I am trying to decrease the lattice constant of crystal from the actual lattice constant, its, structure gets distorted. Below I have attached two images of the same crystal with actual and 10% reduced lattice constant:

1. Actual lattice constant: 5.7981 Angstrom

1. 10% reduced lattice constant: 5.218 Angstrom

The distorted structure can be easily seen in the second image with a reduced lattice constant.

Now I am wondering, how can I perform DFT calculations by applying external pressure? Since reducing the lattice constant corrupts the actual structure. Should I go any other way?

The PWscf input files can be found here and in the code blocks below:

10% reduced lattice:

&CONTROL
title = 'Mn2CoGa' ,
calculation = 'scf' ,
outdir = '.' ,
pseudo_dir = '.' ,

prefix = 'Mn2CoGa' ,
etot_conv_thr = 1.0D-6 ,
forc_conv_thr = 1.0D-6 ,
tstress = .true. ,
tprnfor = .true. ,
/
&SYSTEM
ibrav = 2,
celldm(1) = 9.861191964,
nat = 4,
ntyp = 3,
ecutwfc = 200 ,
ecutrho = 2000 ,
occupations = 'smearing' ,
degauss = 0.01 ,
smearing = 'marzari-vanderbilt' ,
nspin = 2 ,
starting_magnetization(1) = -0.167,
starting_magnetization(2) = -0.083,
starting_magnetization(3) =  0.005,
/
&ELECTRONS
/
&IONS
/
&CELL
/
ATOMIC_SPECIES
Mn   54.93804  mn_pbe_v1.5.uspp.F.UPF
Co   58.93319  Co_pbe_v1.2.uspp.F.UPF
Ga   69.72300  Ga.pbe-dn-kjpaw_psl.1.0.0.UPF
ATOMIC_POSITIONS alat
Co      0.500000000    0.500000000    0.500000000
Mn      0.250000000    0.250000000    0.250000000
Ga      0.750000000    0.750000000    0.750000000
Mn      0.000000000    0.000000000    0.000000000
K_POINTS automatic
12 12 12 0 0 0



5% reduced lattice:

&CONTROL
title = 'Mn2CoGa' ,
calculation = 'scf' ,
outdir = '.' ,
pseudo_dir = '.' ,

prefix = 'Mn2CoGa' ,
etot_conv_thr = 1.0D-6 ,
forc_conv_thr = 1.0D-6 ,
tstress = .true. ,
tprnfor = .true. ,
/
&SYSTEM
ibrav = 2,
celldm(1) = 10.40903596,
nat = 4,
ntyp = 3,
ecutwfc = 300 ,
ecutrho = 3000 ,
occupations = 'smearing' ,
degauss = 0.01 ,
smearing = 'marzari-vanderbilt' ,
nspin = 2 ,
starting_magnetization(1) = -0.167,
starting_magnetization(2) = -0.083,
starting_magnetization(3) =  0.005,
/
&ELECTRONS
/
&IONS
/
&CELL
/
ATOMIC_SPECIES
Mn   54.93804  mn_pbe_v1.5.uspp.F.UPF
Co   58.93319  Co_pbe_v1.2.uspp.F.UPF
Ga   69.72300  Ga.pbe-dn-kjpaw_psl.1.0.0.UPF
ATOMIC_POSITIONS alat
Co      0.500000000    0.500000000    0.500000000
Mn      0.250000000    0.250000000    0.250000000
Ga      0.750000000    0.750000000    0.750000000
Mn      0.000000000    0.000000000    0.000000000
K_POINTS automatic
20 20 20 0 0 0


Actual lattice:

&CONTROL
title = 'Mn2CoGa' ,
calculation = 'scf' ,
outdir = '.' ,
pseudo_dir = '.' ,

prefix = 'Mn2CoGa' ,
etot_conv_thr = 1.0D-6 ,
forc_conv_thr = 1.0D-6 ,
tstress = .true. ,
tprnfor = .true. ,
/
&SYSTEM
ibrav = 2,
celldm(1) = 10.95687996,
nat = 4,
ntyp = 3,
ecutwfc = 200 ,
ecutrho = 2000 ,
occupations = 'smearing' ,
degauss = 0.01 ,
smearing = 'marzari-vanderbilt' ,
nspin = 2 ,
starting_magnetization(1) = -0.167,
starting_magnetization(2) = -0.083,
starting_magnetization(3) =  0.005,
/
&ELECTRONS
/
&IONS
/
&CELL
/
ATOMIC_SPECIES
Mn   54.93804  mn_pbe_v1.5.uspp.F.UPF
Co   58.93319  Co_pbe_v1.2.uspp.F.UPF
Ga   69.72300  Ga.pbe-dn-kjpaw_psl.1.0.0.UPF
ATOMIC_POSITIONS alat
Co      0.500000000    0.500000000    0.500000000
Mn      0.250000000    0.250000000    0.250000000
Ga      0.750000000    0.750000000    0.750000000
Mn      0.000000000    0.000000000    0.000000000
K_POINTS automatic
12 12 12 0 0 0


Thank you!

• +1 But you might want to split this up into 2 questions and cross-link them. You could also put the input file here: github.com/HPQC-LABS/Modeling_Matters in a folder called 4701 (sine the URL of this question indicates that it's post #4701) if you want it to be with the rest of the files for this site, however if the input/data files are only a few thousand lines long, we usually just ask people to put them in a code block. Apr 12 at 20:59
• @Nike Dattani, I will upload the files to GitHub repository linked by you. Thank you!
– UJM
Apr 13 at 3:00

I would not recommend applying external hydrostatic pressure by changing the lattice parameter by hand. This is because fixing the lattice parameters by hand may lead to the incorrect structure. For example, the system may have a pressure-induced structural phase transition that may change it from cubic to tetragonal, and by fixing the lattice parameters by hand you would miss this.

Most DFT codes have the functionality to minimize the enthalpy $$H=U+PV$$ of the system (rather than the usual internal energy), so that you can directly relax the structure under an externally applied hydrostatic pressure. This is in fact a minor addition that does not really affect computational cost because all you need to do is to add the $$PV$$ term, which is trivial to evaluate. With this approach, you have a better change of identifying any structural phase transitions.

While I have done this multiple times with other codes, I have not done it with Quantum Espresso. However, a quick search through their documentation suggests that the keyword press is what you are looking for. You can find the details in this link.

I would also like to add that the discussion above about structural phase transitions associated with changes in lattice parameters also applies to internal coordinates. You mention that by changing the lattice parameter the structure "gets corrupted" because there is an internal distortion of the atoms. I would encourage you to reconsider this approach: it may well be that the structure undergoes a structural phase transition under hydrostatic pressure. Therefore, I would not consider a distortion an "error", what you should do is to compare the enthalpy of the distorted structure with that of the undistorted one under the same pressure conditions, and then the lowest enthalpy one is the most favorable one.

• thank you. Does the 'vc-relax' calculation in DFT give the relaxed structure and lattice constants consistent with the atmospheric pressure? Do I have to apply atmospheric pressure externally to see how it will behave in the real atmosphere?
– UJM
Apr 13 at 8:05
• As far as I understand vc-relax, then this corresponds to P=0GPa. Atmospheric pressure is about $10^{-4}$ GPa, so in principle they are not exactly the same. However, it is common practice to use P=0 to replicate "atmospheric pressure" because typical pressures over which relevant physics occurs, e.g. phase transitions, tend to be orders of magnitude larger (on the GPa range). The errors associated with, for example, the choice of functional are probably larger than the "approximation" of setting atmospheric pressure to 0 GPa. Apr 13 at 8:09

In your case, the crystallographic axes look to be equivalent, so just use 'relax' to start with. This will fix the lattice constants (equivalent to applying pressure) but will move the atoms around - make sure you modify the lattice parameter to reflect the 5% strain, 10% strain etc. Then, perform your SCF calculation.

If your crystallographic axes are inequivalent, you need to make use of cell_dofree. You need to decide along which axis you want to apply pressure. If say, you apply along 'x', then you will need to relax the cell along the other two directions. Hence, you will be required to set cell_dofree='yz'. In this case, you would use the vc-relax tag.

• yes axes are equivalent. Could you please brief more about how can I modify the lattice parameter to reflect the 5% strain, 10% strain etc? It will be helpful.
– UJM
Apr 13 at 3:05
• Oh, just replace it in the input file. If your original lattice parameter is 10 Angstrom, and if you want to apply 1% tensile train, the parameter would just become 10.1 Angstrom. So, 10.1 will be your input lattice parameter for the calculation. Additionally, you will notice high forces on the cell in your output, since you are straining it. Oh and also, you need to start with completely relaxed parameters. In the above example, I'm assuming 10 angstrom corresponds to completely relaxed parameter. Apr 13 at 4:00
• but I want to contract the lattice by applying external pressure for which I am reducing the lattice constant. I didn't understand why you are asking to increase the lattice constant. I think it will create internal pressure in the crystal, isn't it?
– UJM
Apr 13 at 4:12
• Nice to see a lot of discussion. Remember there's a quantum ESPRESSO chat room if the discussion gets too long! Apr 13 at 4:54