Skip to content

Moving the coordination number to mctc-lib#71

Merged
thfroitzheim merged 17 commits intogrimme-lab:mainfrom
thfroitzheim:ncoord
Mar 19, 2025
Merged

Moving the coordination number to mctc-lib#71
thfroitzheim merged 17 commits intogrimme-lab:mainfrom
thfroitzheim:ncoord

Conversation

@thfroitzheim
Copy link
Copy Markdown
Member

It would be quite beneficial to have a centralized place to calculate the CN since it appears in all of our projects (xtb, tblite, dftd4, dftd3, multicharge, DRACO, ...). Moreover, there are now several different CNs based on slight variations of the counting function, which must be integrated in several places.

mctc-lib might be the right spot since it is purely based on the structure, but I am open to alternatives (@awvwgk, @Albkat, @marvinfriede). As an example, I moved the tblite implementation to the mctc-lib. This also includes the cutoffs for periodicity and part of the data sections (maybe we should move the whole as literature radii and EN are also frequently used).

If we should do this, I will still clean up a few things in the CN (i.e. rename the gfn CN to dexp for double exponential) to make it general.

Copy link
Copy Markdown
Member

@awvwgk awvwgk left a comment

Choose a reason for hiding this comment

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

The update for the GH actions can be a separate PR.

@thfroitzheim
Copy link
Copy Markdown
Member Author

Sure. I moved the update of the GH actions to (#72).

I am mostly interested if you think that mctc-lib is the right place for the coordination numbers.

@marvinfriede
Copy link
Copy Markdown
Member

I agree with moving the CNs and data here. I also did that for the autodiff versions (CN, data).

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 11, 2024

Codecov Report

Attention: Patch coverage is 61.71810% with 459 lines in your changes missing coverage. Please review.

Project coverage is 69.06%. Comparing base (77f65c6) to head (0ec7619).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
test/test_ncoord.f90 57.62% 32 Missing and 268 partials ⚠️
test/test_data.f90 26.47% 30 Missing and 20 partials ⚠️
src/mctc/cutoff.f90 62.50% 2 Missing and 22 partials ⚠️
test/test_cutoff.f90 48.38% 6 Missing and 10 partials ⚠️
src/mctc/ncoord.f90 55.17% 1 Missing and 12 partials ⚠️
src/mctc/io/utils.f90 44.44% 5 Missing and 5 partials ⚠️
src/mctc/ncoord/type.f90 89.79% 0 Missing and 10 partials ⚠️
src/mctc/data/vdwrad.f90 70.00% 5 Missing and 1 partial ⚠️
src/mctc/ncoord/erf/dftd4.f90 77.77% 0 Missing and 6 partials ⚠️
src/mctc/ncoord/erf/en.f90 77.77% 0 Missing and 6 partials ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
- Coverage   69.79%   69.06%   -0.73%     
==========================================
  Files          64       79      +15     
  Lines        8618     9957    +1339     
  Branches     2579     3150     +571     
==========================================
+ Hits         6015     6877     +862     
- Misses        782      848      +66     
- Partials     1821     2232     +411     

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

@thfroitzheim
Copy link
Copy Markdown
Member Author

I think this is now ready. I opened draft PRs for the changes necessary in dftd4, simple-dftd3, multicharge, and tblite. Currently, they point to this branch and will be updated to the mctc-lib head as soon as this PR is merged.

This PR collects all coordination numbers with different counting functions, electronegativity dependences, and cutoffs in mctc-lib. They are used via a coordination number type. Additionally, common data such as Pauling electronegativity or different radii are collected in mctc-lib.

@thfroitzheim thfroitzheim marked this pull request as ready for review March 17, 2025 23:02
@thfroitzheim thfroitzheim merged commit 25dd6f4 into grimme-lab:main Mar 19, 2025
9 of 11 checks passed
@thfroitzheim thfroitzheim deleted the ncoord branch March 19, 2025 08:33
@thfroitzheim thfroitzheim restored the ncoord branch March 26, 2025 16:18
@thfroitzheim thfroitzheim deleted the ncoord branch November 12, 2025 08:52
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.

4 participants