Skip to content

Conversation

@caic99
Copy link
Member

@caic99 caic99 commented Aug 8, 2025

This pull request adds support for applying DFT-D3 dispersion corrections with customizable damping options to the ASE-based evaluation workflow. The main changes introduce a damping parameter to relevant methods and classes, allowing users to specify the type of damping used in DFT-D3 corrections, and update the calculator setup accordingly.

DFT-D3 Dispersion Correction Support:

  • Added a damping parameter (of type Literal["d3bj", "d3zero"] | None) to DirectPredictTask and the run_ase_dptest method, enabling the selection of DFT-D3 damping schemes or disabling them. (lambench/tasks/direct/direct_tasks.py, lambench/models/ase_models.py) [1] [2] [3]
  • Modified the ASE model evaluation flow to pass the damping parameter from the task to the DFT-D3 setup. (lambench/models/ase_models.py)
  • Updated the calculator instantiation in run_ase_dptest to use a SumCalculator that combines the original calculator with a DFTD3 correction if damping is specified. (lambench/models/ase_models.py)
  • Added necessary imports for SumCalculator and DFTD3 to support the new functionality. (lambench/models/ase_models.py)
  • Updated type hints to include Literal for the new damping parameter. (lambench/models/ase_models.py, lambench/tasks/direct/direct_tasks.py) [1] [2]

@caic99 caic99 requested review from anyangml and Copilot August 8, 2025 09:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements DFT-D3 dispersion correction support for ASE-based calculations by adding customizable damping options. The implementation allows users to apply different DFT-D3 damping schemes or disable dispersion corrections entirely.

  • Added damping parameter to DirectPredictTask class and run_ase_dptest method with support for "d3bj", "d3zero", or None values
  • Integrated DFT-D3 corrections using SumCalculator to combine base calculator with DFTD3 when damping is specified
  • Updated type annotations and imports to support the new functionality

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
lambench/tasks/direct/direct_tasks.py Added damping parameter to DirectPredictTask class with type hints and initialization
lambench/models/ase_models.py Updated run_ase_dptest method to accept damping parameter and integrate DFTD3 calculator

Co-authored-by: Copilot <[email protected]>
@codecov
Copy link

codecov bot commented Aug 8, 2025

Codecov Report

❌ Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.89%. Comparing base (698d45f) to head (a39b9d2).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lambench/models/ase_models.py 57.14% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #348   +/-   ##
=======================================
  Coverage   65.88%   65.89%           
=======================================
  Files          35       35           
  Lines        1583     1589    +6     
  Branches      188      189    +1     
=======================================
+ Hits         1043     1047    +4     
- Misses        498      500    +2     
  Partials       42       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@anyangml anyangml left a comment

Choose a reason for hiding this comment

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

LGTM

@anyangml anyangml merged commit e9efb10 into main Aug 8, 2025
2 checks passed
@anyangml anyangml deleted the damp branch August 8, 2025 12:18
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.

3 participants