You can add --gfnff to the field “Extra command line options for xtb” in the plugin’s configuration dialog and that seems to override the usual optimization method and use the force field instead. In my quick test, anyway
I didn’t add GFN-FF to the list of methods in the plugin for a few reasons, one being that the plugin’s commands are collected under “semi-empirical QM” and it would then maybe be a bit misleading.
A second reason is that Avogadro’s built-in force field framework has GFN-FF already. Using that might be a better option for you, depending on exactly what you are looking for? I don’t quite know what you need to do in order to make GFN-FF actually available to choose - @ghutchis will be more help there.
I would potentially reconsider adding proper support, but I’d more likely pursue an alternative xtb interface for the force field framework.
Well the main intention of the plugin is to provide a built-in semi-empirical method in the same way that PM6 and friends are so conveniently available in SPARTAN, and to be positioned very much in contrast to the force field methods as a distinct ladder on the rung with a fundamentally different model and better accuracy. So I’m not keen to muddy the waters too much, as it were, as it makes it less clear which tool should be used for which job.
Geoff did a fair bit of work to implement the force field framework as a nice abstraction around any and all force fields, and building on top of it further (e.g. enabling “live” optimization) is planned. So it wouldn’t make a lot of sense to implement GFN-FF support in the plugin as an alternative to the xTB methods instead of in the force field framework.
What I could do would be to add an interface between the plugin and the force field framework, so that the former could run calculations using GFN-FF via the plugin. At the moment though a plugin can only provide one “type” of functionality, so that would have to wait until after the intended (by me) redesign of the plugin API.
The other problem with that is that it’s kind of too slow anyway, because the FFF wants to get a gradient for every step which means loading the plugin and doing the file I/O and executing xtb for every step, which is inefficient.
Now that there’s even the standalone version of GFN-FF available that @ghutchis linked, a better approach would be to make use of that and get it nicely integrated with the FFF the same way that UFF soon will be.
I took out the Python scripts with the recent release - I need to clean them up a bit for a plugin, but maybe I’ll just create a GitHub repo for people to finish (e.g., adding a requirements.txt or whatever for xtb-python)
Currently that’s the main pre-requisite. If you have the xtb-python package installed, you can optimize with GFN-FF, GFN0, GFN2, etc.
@Miroslav_Ilias Out of interest – because I’m keen to understand what people want to use the plugin for – what’s your use-case here? Why is it that GFN-FF support in the plugin would be useful to you?
In particular I’m wondering:
Why don’t you want to use the semi-empirical xTB methods, since they’re going to give better results? Is it about molecule size?
If you definitely need to use a force field as opposed to QM, why aren’t UFF or MMFF94 good enough for your purposes?
Why is using the plugin for your workflow preferable to command-line usage of the xtb program itself?
Avogadro 2 is good for drawing also periodic structures. Superheavies in the structure can be replaced by elements with Z<=86. Plus we need the periodicity.
PS: Also, I am writing teaching text on molecular modelling, so I am testing current Avogadro 2 functionalities. Here xtb working for molecular calcs is welcome.
I believe the docs are simply out of date on that point, tblite was integrated into xtbtwo years ago.
Briefly testing myself, optimization of periodic structures is definitely possible with the original GFN-xTB. I can’t get it to work with GFN2-xTB (though the issue for it was closed a long time ago, so you’d think it ought to be supported).
From what I can tell the support for PBCs with GFN-FF then actually came later, in xtb 6.7.0.
Certainly xtb is happy to read geometry files with periodic structures.
I had the plugin set up to run calculations on periodic structures prior to v0.5, I think with --gfn 1.