Skip to content

Add support for EEQ-BC partial charges in DFT-D4#311

Merged
marvinfriede merged 8 commits intodftd4:mainfrom
thfroitzheim:eeq-bc
Nov 10, 2025
Merged

Add support for EEQ-BC partial charges in DFT-D4#311
marvinfriede merged 8 commits intodftd4:mainfrom
thfroitzheim:eeq-bc

Conversation

@thfroitzheim
Copy link
Copy Markdown
Contributor

This PR incorporates the EEQ-BC model to calculate the partial charges in DFT-D4.

  • Now the dispersion model contains a multicharge model for charge calculation.
  • I renamed the selection of partial charges from ref to qmod to avoid any confusion with the reference systems or polarizabilities.
  • I also included the necessary values for the EEQ-BC charge of the reference systems.

All tests should work after #310

Copy link
Copy Markdown

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 adds EEQ-BC (Bond-Capacity Electronegativity Equilibration) support to DFT-D4 as an alternative charge model for partial charge calculation. The primary purpose is to incorporate a new multicharge model for more accurate charge determination in dispersion calculations.

Key changes:

  • Integrates multicharge dependency for charge calculation instead of the previous local implementation
  • Renames charge selection parameter from ref to qmod to clarify it refers to charge models
  • Adds EEQ-BC charge model option alongside existing EEQ and GFN2 models

Reviewed Changes

Copilot reviewed 20 out of 22 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test/unit/test_model.f90 Updates test suite to use multicharge library and adds EEQ-BC test cases
test/unit/test_dftd4.f90 Adds integration tests for EEQ-BC charge model with D4 and D4S dispersion
subprojects/multicharge.wrap Updates multicharge dependency to HEAD revision
src/dftd4/reference.f90 Adds EEQ-BC reference charge and polarizability calculation functions
src/dftd4/model/type.f90 Renames d4_ref to d4_qmod and adds EEQBC option to charge model enum
src/dftd4/model/d4s.f90 Updates D4S model to support multicharge integration and EEQ-BC
src/dftd4/model/d4.f90 Updates D4 model to support multicharge integration and EEQ-BC
src/dftd4/model.f90 Updates model wrapper to pass qmod parameter
src/dftd4/disp.f90 Replaces local charge calculation with multicharge library calls
src/dftd4.f90 Exports d4_qmod enum for public API
app/driver.f90 Adds command-line support for selecting charge models
app/cli.f90 Implements --qmodel command-line argument
app/04-energy-d4-eeqbc.json Reference test output for EEQ-BC energy calculation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.92%. Comparing base (6cb449a) to head (2361ef7).
⚠️ Report is 32 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #311       +/-   ##
===========================================
+ Coverage   41.13%   63.92%   +22.79%     
===========================================
  Files          33       20       -13     
  Lines        2966     1325     -1641     
  Branches     1347      203     -1144     
===========================================
- Hits         1220      847      -373     
+ Misses       1005      335      -670     
+ Partials      741      143      -598     

☔ 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.

@marvinfriede
Copy link
Copy Markdown
Member

We could make a multicharge release first to avoid pinning HEAD.

@marvinfriede marvinfriede merged commit 62cf2a4 into dftd4:main Nov 10, 2025
48 checks passed
@thfroitzheim thfroitzheim deleted the eeq-bc branch November 12, 2025 08:48
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