nomad-coe / greenX

Library for Green’s function based electronic structure theory calculations
https://nomad-coe.github.io/greenX/
Apache License 2.0
22 stars 11 forks source link

Answer to the referee's comment about the example #60

Closed aziziph closed 1 year ago

aziziph commented 1 year ago

Dear all, Could you please write your comments here to decide about answering Dario's comment? Here is the comment: "I suggest you to include here at lest a simple example illustrating the efficiency of the minimax grids. Maybe it could be done by integrating a toy function, but I also would like to see if you can get an estimate of how much it is reduced the prefactor of low-scaling MP2/RPA/GW calculations to justify the exclusive use of this particular quadrature.

Another related question. In line 150 of the pdf you specify that the number of time/frequency points in the library ranges from 2 to 64, how are these values related to the final accuracy of correlation and quasi-particle energies?"

As we discussed, Here is my answer:

As the length of the paper is already long, we can provide here an example which is public and accessible to all. rpa Here, the evaluation of the RPA total energy with the GL, mod-GL and minimax imaginary frequency grids for the a) water molecule and the b) MgO are shown. All the values are in eV. As it is clear, using 16 grid points, the results obtained by GX-TimeFrequncy are converged.

@gonzex @JWilhelm @dgolze @fdelesma @Panadestein @AlexBuccheri @gulans @claudia-draxl @PatrickRinke @gmatteo

JWilhelm commented 1 year ago

Thank you Maryam, for sharing the referee question. As text, I would propose:

"We thank the referee for the suggestion. As the paper is already long, we would like to focus on the description of the library which also means that we would like to omit benchmarks illustrating the efficiency of minimax grids. We agree that it is highly interesting to compare minimax grids against standard time and frequency grids, which we will report extensively in an unpublished work, referenced as Azizi2023. We are happy to provide here an example which will become public once the reference Azizi2023 is published. In this test, we evaluate the RPA total energy of a gas-phase H2O molecule and bulk MgO using a Gauss-Legendre grid, a modified Gauss-Legendre grid (so far the standard in FHI-aims and abinit), and minimax grids. An accuracy of 10^-6 eV is reached with 12 minimax grid points for both, H2O and MgO, while the modified Gauss-Legendre grids requires X (to be replaced) points for this accuracy."

As a side remark, it would be excellent if one could improve the quality of both figures; for example, the error of the RPA total energy should further decrease for minimax grids with more than 16 points. Moreover, the only information contained in the RPA total energy plot is that the Gauss-Legendre grid is bad for very few grid points.

aziziph commented 1 year ago

Thank you @JWilhelm . @fdelesma could you please try to produce a new plot and apply the improvement that are proposed by Jan?

fdelesma commented 1 year ago

@aziziph @JWilhelm

I have already tried to improve the figure by printing the RPA energies with 20 digits and it does not improve. I am taking the RPA energy calculated using the modified GL grid with 200 points. It could be that this is not a good reference. I have been discussing with @dgolze to take as reference the RPA energy obtained with 34 minimax grid points. What do you think?

JWilhelm commented 1 year ago

Thanks for clarifying @fdelesma. It will be interesting to use the 34 minimax grid points as a reference. It would be also interesting to make a convergence test with the modified GL grid with 500, 1000, 2000, 5000, 10000, 20000 points. After doing this test, one needs to validate that the modified GL grid and the minimax grids converge to the same RPA correlation energy. If this is the case, I would use the RPA energy from the modified GL grid with 20000 points as reference (or, in case 20000 points are not enough for convergence of the modified GL grid, even more points)

fdelesma commented 1 year ago

Here is a quick test.

mini_ref_34

I think we are still playing with the numerical resolution of the plotting program, i.e. GNUplot

JWilhelm commented 1 year ago

Thanks for this update. The errors already look much better. It is ok in my opinion, that the improvement for more than 26 grid points is not significant, as the error is already so small that other error sources may become important.

In my opinion, I would only show the Error as a figure, not the total RPA energy (because there is very little information in plotting the RPA total energy).

Coming back to the large GL grid calculations, @fdelesma: Would you think such large GL grids with 10000 points or even more are feasible?

fdelesma commented 1 year ago

Here are the results,

Minimax: N RPA eneregy
34 -2079.56998488659837676096
mod-GL: N RPA eneregy
500 -2079.56998488719045781181
1000 -2079.56998488976660155458
2000 -2079.56998489430543486378
5000 -2079.56998495198604359757
10000 -2079.56998597116671589902
20000 -2079.56999237191666907165

@JWilhelm What do you think?

JWilhelm commented 1 year ago

Thanks for sharing. I would take the mod-GL grid with 500 points as a reference for the Figure. It seems the numerical precision deteriorates for mod-GL with more grid points.

JWilhelm commented 1 year ago

@fdelesma Ok, when using 500 mod-GL, you get again an error which does not decrease for a minimax grid with 16 points or more, right? In this case, taking the 34 minimax points as reference will be fine. Maybe one additional question: Is it possible to also have the error for 30 minimax points for MgO?

dgolze commented 1 year ago

@fdelesma one question, should we leave the water and MgO example for the benchmark paper? I thought we wanted to show the reviewer of the JOSS the results for, e.g., CH4?

fdelesma commented 1 year ago

@JWilhelm That is correct, using 500 mod-GL grid points does not improve the plot. I will take the 34 minimax grid points as a reference. @dgolze You are right. Water and MgO example is for the benchmark paper. I will work on the CH4 example. FYI @JWilhelm @aziziph

aziziph commented 1 year ago

@dgolze If Antonio @fdelesma could provide the results for CH4 it would be nice. If not, we mention that this results are taken from unpublished paper. What do you think?

fdelesma commented 1 year ago

@aziziph I have the result for CH4. I only need to re-plot. I will post it as soon as I have it.

fdelesma commented 1 year ago

Here is the new plot for CH4, The reference for the errors is the RPA energy obtained with 34 mininimax grid points.

methane

@dgolze @JWilhelm @aziziph Any comments for improvement?

JWilhelm commented 1 year ago

Thanks, @fdelesma The energy difference plot looks good to me. I would actually prefer to only plot the energy difference, not the RPA total energy. It is not possible to judge on the accuracy of the frequency integration from the plot of the RPA total energy.

fdelesma commented 1 year ago

@JWilhelm @aziziph @dgolze Here is the new plot

methane

Error differences of the total RPA energy [eV] of methane calculated using the Gauss-Legendre, modified Gauss-Legendre and minimax imaginary frequency grid points. These differences were calculated with respect to the lowest RPA energy obtained with 34 minimax grid points. The ground state energy was calculated using the PBE exchange correlation functional in combination of the Tier2 basis set. The global resolution of identity (RI-V) approach was used for the calculation of the exact exchange and RPA correlation energy. The auxiliary basis functions for the RI-V method were generated automatically on the fly.

aziziph commented 1 year ago

@fdelesma @JWilhelm @dgolze I am finalizing the answer to the referee's comment. Please let me know if you agree with this answer:

We thank the referee for the suggestion. As the paper is already long, we would like to focus on the description of the library which also means that we would like to omit benchmarks illustrating the efficiency of minimax grids. We agree that it is highly interesting to compare minimax grids against standard time and frequency grids, which we will report extensively in an unpublished work, referenced as Azizi2023. We are happy to provide here an example. In this test, we evaluate the RPA total energy of CH4 using a Gauss-Legendre grid, a modified Gauss-Legendre grid (so far the standard in FHI-aims and abinit), and minimax grids. An accuracy of 10^-6 eV is reached with 10 minimax grid points while the modified Gauss-Legendre grids requires 36 points for this accuracy (Please see the following figure). CH4 Error differences of the total RPA energy [eV] of methane calculated using the Gauss-Legendre, modified Gauss-Legendre and minimax imaginary frequency grid points. These differences were calculated with respect to the lowest RPA energy obtained with 34 minimax grid points. The ground state energy was calculated using the PBE exchange correlation functional in combination of the Tier2 basis set. The global resolution of identity (RI-V) approach was used for the calculation of the exact exchange and RPA correlation energy. The auxiliary basis functions for the RI-V method were generated automatically on the fly.

dgolze commented 1 year ago

shouldn't we also mention that the editor notified us that the paper is borderline long? --> you can also quote her

aziziph commented 1 year ago

@dgolze Then I add that "the editor already notified us that the paper is borderline long but for the technical reason shortening the paper is not possible. hence,we would like to focus on the description ... " Is it sufficient enough?

dgolze commented 1 year ago

@aziziph rather directly citing the editor [...] The editor already remarked on the length of the paper "JOSS papers are short advertisements for the software package, and as a guideline the word count is 250-1000 words. Your paper currently exceeds this guideline by a significant amount." Since it is not possible to shorten the paper without sacrificing clarity, it seems that adding further material to the paper is not appropriate. However, we agree that [...]