Skip to content

Support Skala-1.0 functional#163

Merged
awvwgk merged 15 commits intomainfrom
copilot/support-skala-functional
Feb 11, 2026
Merged

Support Skala-1.0 functional#163
awvwgk merged 15 commits intomainfrom
copilot/support-skala-functional

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 6, 2026

Adds DFT-D3(BJ) dispersion correction support for the Skala-1.0 functional (same parameters as B3LYP) and fixes a Python build failure caused by a stale setuptools version constraint.

Skala-1.0 functional support

  • Add p_skala_df method ID with case("skala1.0") mapping (hyphens stripped by get_method_id)
  • D3(BJ) rational damping only — Skala does not support other D3 variants
  • Dedicated DOI (10.48550/arXiv.2506.14665) with full 25-author citation in both citation.f90 and parameters.toml
  • TOML key quoted as [parameter."skala-1.0"] to avoid subtable interpretation

Bug fix: get_method_id uninitialized variable

Initialize lc_method to blanks before the hyphen-stripping loop. Without this, method names containing hyphens (like skala-1.0) leave uninitialized trailing characters that break trim() and string comparison.

Python: replace deprecated pkg_resources import

test_library.py used pkg_resources.parse_version which was removed in setuptools 78+. Replaced with packaging.version.Version:

# Before
from pkg_resources import parse_version
assert parse_version(get_api_version()) == parse_version(__version__)

# After
from packaging.version import Version
assert Version(get_api_version()) == Version(__version__)

Python: remove setuptools version constraint

The setuptools<78 build-system constraint was added for the now-removed pkg_resources usage and was failing CI. Removed the cap — setuptools is still required (cffi's distutils_extension() returns a setuptools.Extension) but no longer needs a version ceiling.

Original prompt

This section details on the original issue you should resolve

<issue_title>Support Skala functional</issue_title>
<issue_description>* https://aka.ms/SkalaDFT

<agent_instructions>Implement Skala-1.0 with the same parameters as B3LYP</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 6, 2026 14:00
Co-authored-by: awvwgk <28669218+awvwgk@users.noreply.github.com>
Co-authored-by: awvwgk <28669218+awvwgk@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement Skala functional with B3LYP parameters Support Skala functional Feb 6, 2026
Copilot AI requested a review from awvwgk February 6, 2026 14:04
@awvwgk
Copy link
Copy Markdown
Member

awvwgk commented Feb 6, 2026

@copilot Skala only support D3(BJ) and not other D3 variants.

@awvwgk awvwgk marked this pull request as ready for review February 6, 2026 14:33
Copilot AI and others added 2 commits February 6, 2026 14:34
Co-authored-by: awvwgk <28669218+awvwgk@users.noreply.github.com>
Co-authored-by: awvwgk <28669218+awvwgk@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 6, 2026

@copilot Skala only support D3(BJ) and not other D3 variants.

Restricted Skala to D3(BJ) only in commit 6d1552f. Removed p_skala_df from the zero, BJM, zeroM, and OP damping case statements in param.f90, kept only d3.bj in parameters.toml, and removed "skala" from the non-BJ test lists.

Comment thread assets/parameters.toml Outdated
Copilot AI and others added 2 commits February 6, 2026 14:44
Co-authored-by: awvwgk <28669218+awvwgk@users.noreply.github.com>
Co-authored-by: awvwgk <28669218+awvwgk@users.noreply.github.com>
Copilot AI requested a review from awvwgk February 6, 2026 14:44
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 6, 2026

Codecov Report

❌ Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.32%. Comparing base (2ec0e33) to head (0af31f7).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/dftd3/param.f90 50.00% 0 Missing and 2 partials ⚠️
src/dftd3/citation.f90 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #163      +/-   ##
==========================================
- Coverage   66.34%   66.32%   -0.03%     
==========================================
  Files          33       33              
  Lines        4627     4632       +5     
  Branches     1608     1612       +4     
==========================================
+ Hits         3070     3072       +2     
- Misses        637      638       +1     
- Partials      920      922       +2     

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

Adds support for the Skala functional to the DFT-D3 parameter stack (primarily D3(BJ)), including parameter lookup, DOI plumbing, and test coverage.

Changes:

  • Introduce a new Skala method ID and map "skala" to D3(BJ) rational damping parameters.
  • Add a Skala DOI constant and include Skala parameter + citation entries in the TOML parameter database.
  • Extend unit tests to include "skala" in the D3(BJ) and D3(BJ)-ATM test method lists.

Reviewed changes

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

File Description
src/dftd3/param.f90 Adds p_skala_df, "skala" mapping, and a dedicated D3(BJ) parameter case using doi_skala.
src/dftd3/citation.f90 Adds doi_skala constant to the citation module’s exported DOI list.
assets/parameters.toml Adds [parameter.skala] D3(BJ) entry and a new Skala citation record keyed by the arXiv DOI.
test/unit/test_param.f90 Includes "skala" in BJ and BJ-ATM unit test method lists with corresponding reference energies.

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

Comment thread src/dftd3/citation.f90
Comment thread assets/parameters.toml
Co-authored-by: awvwgk <28669218+awvwgk@users.noreply.github.com>
Copilot AI requested a review from awvwgk February 6, 2026 18:30
@awvwgk
Copy link
Copy Markdown
Member

awvwgk commented Feb 11, 2026

@copilot specify skala with version number, i.e. skala-1.0 instead of just skala as future versions might differ in D3 settings.

…hod_id

Co-authored-by: awvwgk <28669218+awvwgk@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 11, 2026

@copilot specify skala with version number, i.e. skala-1.0 instead of just skala as future versions might differ in D3 settings.

Renamed to skala-1.0 everywhere in fd055f5. Also initialized lc_method in get_method_id to fix a latent bug where hyphen-stripping left uninitialized characters in the comparison string.

Copilot AI requested a review from awvwgk February 11, 2026 07:59
Comment thread assets/parameters.toml Outdated
…etuptools<78

Co-authored-by: awvwgk <28669218+awvwgk@users.noreply.github.com>
Copilot AI changed the title Support Skala functional Fix pkg_resources ImportError in Python tests and constrain setuptools Feb 11, 2026
@awvwgk awvwgk changed the title Fix pkg_resources ImportError in Python tests and constrain setuptools Support Skala functional Feb 11, 2026
Copilot AI and others added 2 commits February 11, 2026 10:13
Co-authored-by: awvwgk <28669218+awvwgk@users.noreply.github.com>
…urces removal

Co-authored-by: awvwgk <28669218+awvwgk@users.noreply.github.com>
Copilot AI changed the title Support Skala functional Support Skala-1.0 functional and fix Python build dependencies Feb 11, 2026
Copilot AI requested a review from awvwgk February 11, 2026 10:14
@awvwgk awvwgk changed the title Support Skala-1.0 functional and fix Python build dependencies Support Skala-1.0 functional Feb 11, 2026
@awvwgk awvwgk merged commit 128c4f3 into main Feb 11, 2026
38 of 41 checks passed
@awvwgk awvwgk deleted the copilot/support-skala-functional branch February 11, 2026 10:23
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.

Support Skala functional

3 participants