pair_style d3 - D3 dispersion corrections#4410
Conversation
|
Some of the unit tests fail because of the expected precision, e.g. from the Linux tests: Also, the reference data was generated using a MacOS build, with the following configuration: Are there any guidelines on build, compiler flags etc. to generate reference data? Or should we simply relax the precision parameter? |
|
quick comment - "d3" is not a descriptive enough name for general users - maybe dispersion/d3 ? |
The Apple-Clang compilers are always a bit funny when compiling with high optimization. You get more consistent results when turning off optimization, e.g. with CMAKE_BUILD_TYPE=Debug, and also running on Linux using gcc instead of clang. The unit tests are deliberately very sensitive and 1e-11 is a very tight epsilon that will only work well for simple fully analytically potentials that have a very smooth potential function and do not use tabulation or interpolation. But this is a minor issue, a quick look at the submitted code shows, that we need to make some modifications to have it better aligned with LAMMPS' coding conventions and also add some maintenance related changes. @soniasalomoni @arthurfl do you prefer to make those changes yourself and have me point them all out in detail, or are you ok with me making the simpler ones myself and only comment on the bigger changes required? The first option is less work for me but less helpful in the long run, in case you plan to do further submissions and updates in the future. Please let me know. |
|
Thanks for the feedback, option 2 would be best, if it’s not too much extra work for you. |
|
@soniasalomoni @arthurfl this pull request is now consistent with the minimum requirements for including it to the distribution. Specifically, the following issues were addressed:
Before we merge this, please let me know if you have any concerns and worries about the changes made or if you can spot any errors, where I may have misunderstood your intentions. A couple more questions:
|
|
Thanks a lot for the update. We'll add an example, although to be meaningful, and because of the way this pair_style is intended to be used, it will depend on an ML potential (probably a pace pair_style in the example). Concerning the reference, I am not aware of any work focusing on the benefit of separating the reference DFT and the dispersion correction rather than training directly on both. There are however many papers in which this strategy is used, usually with D2, since as a pure two-body correction, it can be easily tabulated. We'll add something along these lines to the docs. |
|
@akohlmey regarding the example folder, should we go for |
I think most consistent with current practices would be either |
megmcca
left a comment
There was a problem hiding this comment.
looks like it's in good shape. i've successfully run both of the example files using the updated README instructions.
| s8 = 0.9147; | ||
| a2 = 5.0570; | ||
| break; | ||
| s6 = 0.64; |
There was a problem hiding this comment.
@soniasalomoni @arthurfl one question about this block.
The s6 = 0.64; line is never executed. Is this expected and it can be removed (it triggers warnings with static code analysis)?
Or is the "break;" statement misplaced and should be moved one line down?
Please advise
There was a problem hiding this comment.
Second option, the "break;" statement should be moved one line down. Thanks for the heads-up
Summary
Implementation of the D3 correction scheme as pair-style d3, in the EXTRA-PAIR package. It should typically be used with an ML potential through pair_style hybrid/overlay.
Related Issue(s)
N/A
Author(s)
Sonia Salomoni, Sorbonne Université (sonia.salomoni AT sorbonne-universite DOT fr)
Arthur France-Lanord, CNRS (arthur.france-lanord AT cnrs DOT fr)
Licensing
By submitting this pull request, I agree, that my contribution will be included in LAMMPS and redistributed under either the GNU General Public License version 2 (GPL v2) or the GNU Lesser General Public License version 2.1 (LGPL v2.1).
Backward Compatibility
Implementation Notes
The code was validated using the original Fortran DFT-D3 implementation and the CP2K D3 implementation.
Post Submission Checklist
Further Information, Files, and Links
Currently working on a kokkos implementation, which we will push later.