grimme-lab / xtb

Semiempirical Extended Tight-Binding Program Package
https://xtb-docs.readthedocs.io/
GNU Lesser General Public License v3.0
568 stars 144 forks source link

Add ability to select solvent model to C api #1065

Closed TyBalduf closed 3 weeks ago

TyBalduf commented 2 months ago

Is your feature request related to a problem? Please describe. Currently, the C-api has a setSolvent functions, which allows setting GBSA implicit solvation. It would be useful to be able to select the solvent model among GBSA, ALPB, COSMO, and CPCM-X (might be a little more involved, since it requires a 2nd SCF loop).

Describe the solution you'd like Add a parameter to setSolvent allowing the solvation model to be specified.

Describe alternatives you've considered Could work around by launching the xTB executable and just parsing the output for the portions I need, but the API is definitely more convenient when working in C/C++

If possible state how you can assist in providing data or code to to implement the feature Plan to put together a code review for this. Might need some pointers on how to handle updating the API version or whether this should just be added as a new setSolventWithModel.

Could also use some input on how to best handle CPCM-X. Current plan is to just leave it to the user to handle running the initial COSMO solvent=infinity SCF loop and then a second SCF loop with CPCM-X and their desired solvent.