SPARC-X / SPARC

Simulation Package for Ab-initio Real-space Calculations
GNU General Public License v3.0
69 stars 37 forks source link

How does the tag "RELAX_MAXDILAT" work in relaxation calculation? #172

Closed Jiang-eat-sugar closed 1 year ago

Jiang-eat-sugar commented 1 year ago

I have a question about Sparc-X tag “RELAX_MAXDILAT”. I thought it can control the change of cell volume during the full relaxation step (RELAX_FLAG=3, RELAX_METHOD= LBFGS). The default RELAX_MAXDILAT = 1.06. But the volume can change by 40%~80% after each iteration for the full relaxation of Si, TiO2, and BaTiO3 materials that I tested. Does anyone know what is going on with the tag “RELAX_MAXDILAT” and how to control the restriction on the cell change?

phanish-suryanarayana commented 1 year ago

Can you share some representative input/output files, so that we can take a closer look. Thanks.

Jiang-eat-sugar commented 1 year ago

I am attaching the example of tetragonal TiO2. If you check the geopt file, the volume of the cell changes from 3.5476676787E+02 to 5.0324344061E+02, which is over 40% change.

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows

From: @.> Sent: Wednesday, April 26, 2023 9:15 AM To: @.> Cc: Luo, @.>; @.> Subject: Re: [SPARC-X/SPARC] How does the tag "RELAX_MAXDILAT" work in relaxation calculation? (Issue #172)

Can you share some representative input/output files, so that we can take a closer look. Thanks.

— Reply to this email directly, view it on GitHubhttps://github.com/SPARC-X/SPARC/issues/172#issuecomment-1523498290, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANON3KLIP2CB7DJTO6LAMUTXDEUYXANCNFSM6AAAAAAXLPNRMQ. You are receiving this because you authored the thread.Message ID: @.***>

Jiang-eat-sugar commented 1 year ago

Hope you can see the files by this link: https://drive.google.com/drive/folders/1y6wcmb5wIbm5RZFH9TIXs2CTTVdaWiKi?usp=share_link

StevenZhangCSFM commented 1 year ago

Hi Jiang, Thank you so much for sharing the input files and output files with us. I have read the files and actually, the relaxation worked without problem. There are two calculations needed to be done at the beginning of cell relaxation: computing the stress of the system with the lower bound volume and computing the stress with the upper bound volume, which are the prerequisites for making interpolation and volume optimization in the next step. In the case you shared with us, the lower bound volume of the system is (1.0/1.06)^3 initial_volume=0.8396 4.2253E02=3.5476E02; the upper bound volume of the system is (1.01.06)^3 initial_volume=1.1910 * 4.2253E02=5.0324E02; So, 5.0324E2 is not the volume of the system in the next step after 3.5476E02: they are independent with each other. I hope this can answer your question. If there is any other question, feel free to let us know.

Jiang-eat-sugar commented 1 year ago

Hi, Here is an outlier example of the relaxation calculation of BaTiS3. 3.7519464904E+01/3.0878501958E+01=1.22, which is higher than the default 1.06/0.94=1.13.

:CELL: 3.3392190196E+01 3.3392190196E+01 8.3751947322E+00 :CELL: 3.3392190196E+01 3.3392190196E+01 8.3751947322E+00 :CELL: 3.3392190196E+01 3.3392190196E+01 8.3751947322E+00 :CELL: 3.3392190196E+01 3.3392190196E+01 8.3751947322E+00 :CELL: 3.3392190196E+01 3.3392190196E+01 8.3751947322E+00 :CELL: 3.3392190196E+01 3.3392190196E+01 8.3751947322E+00 :CELL: 3.3392190196E+01 3.3392190196E+01 8.3751947322E+00 :CELL: 3.3392190196E+01 3.3392190196E+01 8.3751947322E+00 :CELL: 3.3392190196E+01 3.3392190196E+01 8.3751947322E+00 :CELL: 3.3392190196E+01 3.3392190196E+01 8.3751947322E+00 :CELL: 3.7519464904E+01 3.7519464904E+01 9.4103688011E+00 :CELL: 3.7519464904E+01 3.7519464904E+01 9.4103688011E+00 :CELL: 3.0878501958E+01 3.0878501958E+01 7.7447290944E+00 :CELL: 3.0878501958E+01 3.0878501958E+01 7.7447290944E+00

More detail in the Google shared folder: https://drive.google.com/drive/folders/1seazVtDFypRixWbmlLPlK9LORwJVqgcV?usp=sharing

StevenZhangCSFM commented 1 year ago

Hi Jiang, Thank you for sharing the new test with us. I just read the output file. The first 10 steps with (:CELL: 3.3392190196E+01 3.3392190196E+01 8.3751947322E+00) are the relaxation in the lower bound of volume (V/1.06^3); the next 2 steps with (:CELL: 3.7519464904E+01 3.7519464904E+01 9.4103688011E+00) are the relaxation in the upper bound of volume (V*1.06^3). However, it is found that after atom relaxations, both stress in system with upper bound volume and lower bound volume are negative. You can see that in .geopt file. In this case, to find the volume making the stress equal to zero, the program will move both the upper bound and lower bound. In this case, the new lower bound of volume is the initial lower bound volume minus the half of difference between upper bound and lower bound. That is where the new (:CELL: 3.0878501958E+01 3.0878501958E+01 7.7447290944E+00) come from. The steps of cell optimization are:

  1. compute the stress of system with the lower bound volume (V/1.06^3);
  2. compute the stress of system with the upper bound volume (V*1.06^3);
  3. if the product stress in both lower bound and upper bound is positive (both of them are positive or both of them are negative), then the lower bound will be set even lower and the upper bound will be set even higher, then repeat the atom relaxation-stress calculation, until a suitable upper bound and lower bound is found.
  4. Based on the value of stresses, make the volume interpolation between the upper bound and the lower bound, until a volume making the stress close to zero is found. So, the coefficient 1.06 only worked at setting the initial upper bound and initial lower bound.
Jiang-eat-sugar commented 1 year ago

Hi Steven,

Thanks for your quick response. Now I understand how to relax the cell. It might be more clear to beginners if you can add more explanation of the sparc-X calculation to the manual.

Thanks! Jiang