Full and privileged xtb integration?

I feel like the avo_xtb plugin now does a pretty decent job at providing the basic functionality that you suggested desirable for an xtb interface i.e. the things in your list on the GitHub issue.

Did you have any further thoughts on how, or more importantly, whether to integrate xtb any deeper into Avogadro and make it effectively part of the software in the same way as Open Babel?

Based on your previous comments I imagine your preferred solution would be to keep it as a plugin, am I right?

This of course doesn’t necessarily preclude having the plugin, even simply in its current state, included as part of the default Avogadro installation. I don’t know if that is desirable to you?

An issue was the question of whether we should be bundling xtb with Avo, or relying on users to manually download it, or to bundle it with the plugin. The latter either requires a script that executes automatically, or xtb to be a dependency that the plugin manager downloads once that functionality is there. That would only work for conda environments though.

I have coded a fourth alternative that is possibly a fairly elegant solution. If an xtb binary wasn’t found on launch, two things are different. Firstly, the various calculation commands are not shown, to tip off the user that something is missing. Secondly, there is a new menu option for “Get xtb…”.

This option installs the binaries from the Grimme repos, after first bringing up a dialog stating that clicking OK will download xtb (and crest on Linux), stating the URLs it will use, and offering the option to customize the install location (which defaults to the plugin directory, or ~/avo_xtb depending on permissions).

I figured this allows a fairly seamless experience for users who don’t already have xtb.

I haven’t pushed that to the main branch of the plugin yet, as I wanted to check if you think it’s a good solution. You can have a look at the code in this branch. Not sure how you feel about plugins downloading things from the web. Or do you have better/more far-reaching ideas than this one anyway?

If you were keen to promote xtb, a similar approach could be adopted to encourage use/increase visibility of the availability of the plugin: Avogadro could show a menu option for semi-empirical calcs/xtb, even if the avo_xtb plugin isn’t installed, with only one option in the sub-menu: “Get the xtb plugin…”, that instructs the plugin manager to download the plugin.