-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft for plugin loading mechanism #1449
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1449 +/- ##
=======================================
Coverage 70.86% 70.86%
=======================================
Files 231 233 +2
Lines 44203 44236 +33
=======================================
+ Hits 31325 31349 +24
- Misses 12878 12887 +9 ☔ View full report in Codecov by Sentry. |
@terminationshock thoughts so far:
We should document all of this up and try to get buy in from other similar codes. @aradi any thoughts? In particular, you had ideas about an internal registry or features, and this should be planned to connect with it smoothly (possibly with extra methods and parser sections turning on/off with plugins). Could we push this far enough to, for example, replace the sockets code with loadable external connector plugin(s). |
Would it be possible to make a case study using an existing external library to implement it via the plugin mechanism? In this case many use cases would be covered which need to be supported for having a proper plugin working with DFTB+. An example could be tblite which is almost completely integrated via two main API routes (computing of integrals for Hamiltonian and exchange of charges and potentials), however still needs a significant change in the DFTB+ main code to work compared with SK based DFTB. Another case which is a bit simpler could be dispersion corrections like DFT-D3 or MBD (note that the latter requires quite some custom work). |
This is a first draft of a plugin loading mechanism. An external C library implements certain functions (see
dftbplus_plugin.h
) and will be loaded in DFTB+ at startup. This example here has been created forgetSKIntegrals
.Both the implementation of the plugin as well as the C binding in DFTB+ are quite lightweight. Further features are needed, like a geometry update notification.
At the moment, I am happy to hear comments and critizism.