Page 1 of 1

Pressure in supercell != pressure in primitive cell

Posted: Sat Jul 06, 2024 10:46 pm
by hyeonseo_park
Hello all,

I am studying TiSe2.
In short, I have two questions:
1) Why is pressure in supercell different from that in primitive cell?
2) In OUTCAR, why is the sum of stress different from the values in Total? ( I guess it is because my structure is not cubic, but it is not very clear to me now )


First, I relaxed its primitive cell and obtained relaxed structure while not breaking its symmetry (P3-m1).
Here is my initial INCAR and POSCAR:
--------------------------------------------INCAR-----------------------------------------
#start parameters
NWRITE = 1
PREC = Accurate #precision mode

#electronic optimization
ENCUT = 350 #cutoff energy
EDIFF = 1.0e-8 #breakout condition for SC loop
NELMIN = 6 #minimum number of electronic SCF steps
NELM = 100
ALGO = Normal

#ionic relaxation
IBRION = 2 #relaxation method
ISIF = 3 #relax dof
NSW = 500 #maximum number of ionic steps (or minimum for IBRION=-1)
EDIFFG = -1.0e-3 #break condition for ionic relaxation

#DOS-related
ISMEAR = 0 #determines how the partial occupancies are set for each orbial
SIGMA = 0.03 #default=0.2, RT=0.026

#Write flags
LWAVE = F

#Exchange correlation treatment
GGA = PS

#performance optimization
NCORE = 8 #set to 1 for Hessians

----------------------------------------------------------------POSCAR-------------------------------------
Ti1 Se2
1.00000000000000
1.7246002501982394 -2.9870952560893484 0.0000000000000000
1.7246002501982394 2.9870952560893484 -0.0000000000000000
0.0000000000000000 -0.0000000000000000 5.7701458666994476
Ti Se
1 2
Direct
-0.0000000000000000 0.0000000000000000 -0.0000000000000000
0.3333333333333357 0.6666666666666643 0.2687784374123854
0.6666666666666643 0.3333333333333357 0.7312215625876074

----------------------------------------------------------------------------------------------------------
For KPOINTS, I used 16x16x8 regular mesh. I checked that lattice parameters converge for this KPOINTS and SIGMA in gaussian smearing.

I obtained CONTCAR (below) from the above calculation, then I transformed it to 2x1x1 supercell using VESTA.

-----------------------------------------------------CONTCAR-----------------------------------------
Ti1 Se2
1.00000000000000
1.7354197531671571 -3.0058351849441554 -0.0000000000000000
1.7354197531671571 3.0058351849441554 0.0000000000000000
-0.0000000000000000 -0.0000000000000000 5.9283104401790681
Ti Se
1 2
Direct
-0.0000000000000000 -0.0000000000000000 0.0000000000000000
0.3333333333333357 0.6666666666666643 0.2615900510841567
0.6666666666666643 0.3333333333333357 0.7384099489158361
---------------------------------------------2x1x1 supercell POSCAR from VESTA----------------------------------------------
Ti1 Se2
1.0
6.9416790009 0.0000000000 0.0000000000
-1.7354201505 3.0058349487 0.0000000000
0.0000000000 0.0000000000 5.9283103943
Ti Se
2 4
Direct
0.000000000 0.000000000 0.000000000
0.500000000 0.000000000 0.000000000
0.166666672 0.666666687 0.261590064
0.666666687 0.666666687 0.261590064
0.333333343 0.333333343 0.738409936
0.833333373 0.333333343 0.738409936
----------------------------------------------------------------------------------------------------------
In the primitive cell, I obtained negligible pressure:


FORCE on cell =-STRESS in cart. coord. units (eV):
Direction XX YY ZZ XY YZ ZX
--------------------------------------------------------------------------------------
Alpha Z 77.25571 77.25571 77.25571
Ewald -296.97819 -296.97819 -784.04723 -0.00000 0.00000 0.00000
Hartree 353.44673 353.44673 -55.12110 -0.00000 -0.00000 -0.00000
E(xc) -106.45123 -106.45123 -106.50008 -0.00000 -0.00000 -0.00000
Local -449.62133 -449.62126 443.79460 0.00000 -0.00000 -0.00000
n-local 59.10808 52.48022 54.75096 -0.42966 -0.46374 0.94699
augment 54.25376 54.25370 55.02942 -0.00000 0.00000 -0.00000
Kinetic 307.08455 317.52030 314.84068 2.43232 -0.45783 -1.58018
Fock 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
-------------------------------------------------------------------------------------
Total 0.00204 0.00204 0.00295 0.00000 -0.00000 -0.00000
in kB 0.05281 0.05281 0.07639 0.00000 -0.00000 -0.00000
external pressure = 0.06 kB Pullay stress = 0.00 kB


On the other hand, when I calculated from the supercell structure using IBRION=6, the supercell now feels some pressure. (In this time, I used 8x16x8 KPOINTS)
--------------------------------------------------------------------------------------NEW INCAR --------------------------------------------------------------------------------------
#start parameters
NWRITE = 1
PREC = Accurate #precision mode

#electronic optimization
ENCUT = 350 #cutoff energy
EDIFF = 1.0e-8 #breakout condition for SC loop
NELMIN = 6 #minimum number of electronic SCF steps
NELM = 100
ALGO = Normal

#ionic relaxation
IBRION = 6 #relaxation method
EDIFFG = -1.0e-3 #break condition for ionic relaxation
POTIM = 0.01 #STEP size (0.5 default for relaxation)

#DOS-related
ISMEAR = 0 #determines how the partial occupancies are set for each orbial
SIGMA = 0.03 #default=0.2, RT=0.026

#phonon dispersion
LPHON_DISPERSION = true # with QPOINTS

#Write flags
LWAVE = F

#Exchange correlation treatment
GGA = PS

#performance optimization
NCORE = 1 #set to 1 for Hessians

--------------------------------------------------------------------------------------OUTCAR from 2x1x1 supercell --------------------------------------------------------------------------------------

FORCE on cell =-STRESS in cart. coord. units (eV):
Direction XX YY ZZ XY YZ ZX
--------------------------------------------------------------------------------------
Alpha Z 154.51144 154.51144 154.51144
Ewald -590.85071 -590.84928 -1572.08526 -0.00117 0.00005 -0.00009
Hartree 709.30361 709.30435 -112.80248 -0.00067 0.00002 -0.00000
E(xc) -212.93170 -212.93170 -213.03269 -0.00001 0.00000 0.00000
Local -904.68780 -904.68980 894.18401 0.00173 -0.00007 0.00005
n-local 111.18570 111.59007 109.27894 0.11717 -0.79642 0.45813
augment 108.35197 108.35174 109.89483 0.00046 0.00000 -0.00002
Kinetic 624.64470 625.31774 630.18702 0.19441 0.27579 -0.15915
Fock 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
-------------------------------------------------------------------------------------
Total 0.06612 0.06566 0.13580 0.00040 -0.00000 -0.00000
in kB 0.85635 0.85041 1.75893 0.00514 -0.00003 -0.00005
external pressure = 1.16 kB Pullay stress = 0.00 kB




----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
As I mentioned initially, I also wonder why the sum of stress in each column is different the value in Total.

Thank you for reading this long question.

Re: Pressure in supercell and sum of stress

Posted: Sat Jul 06, 2024 10:55 pm
by hyeonseo_park
I attached my input files and OUTCAR.
GMcell is about the calculation of primitive cell, and Mcell is about the calculation of 2x1x1 supercell

Re: Pressure in supercell != pressure in primitive cell

Posted: Tue Jul 09, 2024 11:05 am
by alexey.tal
Hi,
1) Why is pressure in supercell different from that in primitive cell?
What calculations are you trying to compare? In your primitive cell calculation you have performed a relaxation with IBRION=2, in your supercell calculation you have performed the Monte-Carlo sampling calculation where you displace atoms, i.e., IBRION=6.
If you perform an SCF calculation for the relaxed primitive cell and the corresponding supercell you should get pretty similar external pressure. You should also keep in mind that as you increase the size of the cell you should adjust the convergence criteria.
2) In OUTCAR, why is the sum of stress different from the values in Total? ( I guess it is because my structure is not cubic, but it is not very clear to me now )
The external pressure is the trace of the stress tensor divided by 3.

Re: Pressure in supercell != pressure in primitive cell

Posted: Wed Jul 10, 2024 11:59 pm
by hyeonseo_park
Thank you for your reply.

When I conducted IBRION=2 calculation in my supercell, I obtained negligible pressure (=-0.19kB). Then, why does IBRION=6 give different pressure? ( Is it due to the step size?)
Because I did not turn on the Monte-Carlo calculation, I assume that IBRION=2 and IBRION=6 calculate pressure in similar ways (by displacing unitcell vector and calculating energy difference).

My second question was not about the pressure. I summed each column of stress and compare it to the values in the Total row. These total values are different from the sum of stress in each column.

Re: Pressure in supercell != pressure in primitive cell

Posted: Thu Jul 11, 2024 12:14 pm
by alexey.tal
Right, you didn't use the Monte-Carlo sampling method, but you did use IBRION=6 and when you use IBRION=6 the second derivatives, Hessian matrix, etc., are calculated via a finite differences approach, i.e.,
we displace atoms from their equilibrium positions and therefore you see the pressure increasing. If you set POTIM to a very small value, then all the displacements should be infinitely small and the pressure should not change.
My second question was not about the pressure. I summed each column of stress and compare it to the values in the Total row. These total values are different from the sum of stress in each column.

The stress tensor is symmetrized before we print the Total row. If you turn off the symmetry ISYM=-1 the tensor should be diagonal and the Total row should be a direct sum of the column above it.