Closed knikhil1995 closed 2 years ago
The default realspace cutoff for the pairwise interactions is set here:
It can be overwritten in the Fortran API, but is not accessible via command line or C/Python API yet.
Thanks, I am implementing support for s-dftd3 and dftd4 (via the C API, treating both as external dependencies for now) in the dftfe code (finite element dft code) but the results from dftfe runs differed from the results obtained from the reference implementation due to the difference in cutoffs.
If possible I would like to request that the cutoff be changed in s-dftd3 so that I may continue treating s-dftd3 as an external dependency otherwise feel free to close this issue.
I will make the real space cutoff accessible via the C/Python API, maybe I can find a way without breaking the API (while we are pre-1.0, I try to take API stability serious here).
I will add an API to set the realspace cutoff in the dispersion model object with
// Set realspace cutoffs (quantities in Bohr)
SDFTD3_API_ENTRY void SDFTD3_API_CALL
dftd3_set_model_realspace_cutoff(dftd3_error /* error */,
dftd3_model /* model */,
double /* disp2 */,
double /* disp3 */,
double /* cn */) SDFTD3_API_SUFFIX__V_0_5;
Let me know whether this is sufficient for your usecase.
Yes, this will be sufficient for my usecase.
Thank you very much.
Out of curiosity, can you share a link to the program package? Is it https://github.com/dftfeDevelopers/dftfe by chance?
Yes, that is the release version, development is being done on bitbucket.
Included in version 0.5.0
Would it be possible to set the default (2-body) cutoff to 94.8683 a.u. as in the reference implementation as opposed to 60 a.u. right now?