Skip to content

Added error if dft-d3 is requested for non-skala functionals#90

Merged
awvwgk merged 4 commits into
mainfrom
add_error_message
Jul 13, 2026
Merged

Added error if dft-d3 is requested for non-skala functionals#90
awvwgk merged 4 commits into
mainfrom
add_error_message

Conversation

@JensWehner

Copy link
Copy Markdown
Contributor

No description provided.

@JensWehner

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree company="Microsoft"

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.

Pull request overview

This PR tightens the PySCF integration by preventing DFT-D3 dispersion correction from being requested when SkalaKS is used with a native PySCF functional string (i.e., when load_functional(...) resolves to a plain XC name).

Changes:

  • Raise a ValueError in SkalaKS when with_dftd3=True but the XC resolves to a native PySCF functional string.
  • Add a pytest covering the new error behavior for xc="b3lyp" with with_dftd3=True.

Reviewed changes

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

File Description
src/skala/pyscf/__init__.py Adds a guard that rejects DFT-D3 usage for native PySCF functionals in SkalaKS.
tests/test_pyscf_classes.py Adds a unit test asserting the new ValueError is raised for native functionals when DFT-D3 is requested.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_pyscf_classes.py
Comment thread src/skala/pyscf/__init__.py
Comment thread src/skala/pyscf/__init__.py
@JensWehner JensWehner changed the title Added error if dftb3 is requested for non-skala functionals Added error if dft-d3 is requested for non-skala functionals Jul 13, 2026
JensWehner and others added 3 commits July 13, 2026 16:13
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@awvwgk awvwgk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me.

@awvwgk awvwgk merged commit e708815 into main Jul 13, 2026
33 checks passed
@awvwgk awvwgk deleted the add_error_message branch July 13, 2026 14:50
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