Skip to content

Re-implement DFT-D3 against the s-dftd3 reference - #7830

Open
Growl1234 wants to merge 5 commits into
deepmodeling:developfrom
Growl1234:dftd3
Open

Re-implement DFT-D3 against the s-dftd3 reference#7830
Growl1234 wants to merge 5 commits into
deepmodeling:developfrom
Growl1234:dftd3

Conversation

@Growl1234

Copy link
Copy Markdown

Note

This PR is based on #7810 as they share the same input parameters settings. Please merge #7810 first.

This PR re-implements the internal DFT-D3 module with s-dftd3 as the reference, while keeping the implementation fully ABACUS-native without introducing an external s-dftd3 dependency.

The legacy D3 evaluator and manually maintained parameter tables are replaced with a substantially simplified implementation that:

  • separates the ABACUS-facing Vdwd3 wrapper from the standalone D3 numerical evaluator, so vdwd3.cpp now mainly handles input, structure adaptation, and unit conversion, while vdwd3_evaluator.cpp contains the actual D3 model;
  • follows the s-dftd3 reference model for coordination numbers, C6 interpolation, D3(0), D3(BJ), and ATM;
  • uses a single evaluator for energy, forces, and virial instead of maintaining separate energy and derivative code paths;
  • generates reference data and damping parameters from a pinned s-dftd3 version;
  • separates coordination-number, two-body, and three-body cutoffs, with smooth-cutoff support;
  • simplifies periodic image handling and analytic derivative evaluation;
  • introduces shared vdW XC-name normalization for D3 and D4;
  • preserves automatic XC detection and user parameter overrides.

The new implementation is validated against s-dftd3 reference energies for molecular, periodic, zero-damping, BJ-damping, ATM, and actinide cases, together with finite-difference checks for gradients and virials.

Copilot AI lite review requested due to automatic review settings August 18, 2026 00:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Growl1234 Growl1234 closed this Aug 18, 2026
@Growl1234 Growl1234 reopened this Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants