Support optional smooth realspace cutoffs#183
Merged
Conversation
Closed
Agent-Logs-Url: https://github.com/dftd3/simple-dftd3/sessions/451aed03-f955-4b68-82a2-e99aeaa4173a Co-authored-by: awvwgk <28669218+awvwgk@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dftd3/simple-dftd3/sessions/451aed03-f955-4b68-82a2-e99aeaa4173a Co-authored-by: awvwgk <28669218+awvwgk@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement support for smooth cutoff in dispersion energy
Support optional smooth realspace cutoffs
May 6, 2026
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #183 +/- ##
==========================================
- Coverage 65.99% 65.75% -0.25%
==========================================
Files 34 35 +1
Lines 4844 4885 +41
Branches 1672 1689 +17
==========================================
+ Hits 3197 3212 +15
- Misses 691 713 +22
- Partials 956 960 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Realspace cutoffs previously introduced hard step functions in dispersion energies, which can create discontinuities in energies, gradients, and stress tensors as interatomic distances cross cutoff boundaries. This adds optional smoothing widths for two- and three-body dispersion cutoffs while preserving existing hard-cutoff behavior by default.
Core dispersion
width2andwidth3torealspace_cutoff.Public APIs
DispersionModel.set_realspace_cutoffwith optionalwidth2andwidth3.realspace_cutoff.Documentation and coverage
Example: