Closed pschmidtke closed 4 years ago
If you provide xtb-python
with the same input as xtb
you will get the same result. Please keep in mind that both xtb
and xtb-python
are working in atomic units, rdkit
is working (at least for the coordinates) in Ångström.
Running the unconverted coordinates through xtb
yields the matching result:
TOTAL ENERGY -4.667743216484 Eh
Ohh that's a noob error on my side :) Thanks, that makes sense then!
It is indeed a quite common error to mix-up Bohr and Ångström. I guess putting a note in the documentation at a more prominent location wouldn't hurt here.
maybe some example code coming from rdkit would be helpful as well in the doc
I'm not familiar with rdkit, but feel free to contribute an integration with rdkit or a recipe for the docs.
Last question: if I specify an sdf as input xtb seems to convert automagically from Angstroms to au. When I specify as xyz from within xtb-python it expects au to be provided, is that right? If I specify a mol input it would work with Angstroms as coordinates provided as well?
Of course not, you get direct write access to the API objects here. The readers implemented in xtb
will parse the respective input format and convert all the quantities before creating the object, it is their responsibility to translate an input following a specification to the internal representation of the object. This provenance is not necessary for the API, because the responsibility to take care of the units is shifted to the API user, which is kinda the price to pay for direct access to the API objects.
Describe the bug
Not sue this is really a bug, you github leaves me no choice ;) I ran xtb with default parameters (charge 0) on the input molecule here: out.sdf.zip
xtb out.sdf --charge 0
When I run xtb through python the python bindings using the sample documentation
I get significantly different energies.
I though that GFN2xTB is also used by default by the xtb binary so I expected similar results. Could you indicate which parameters to use in the python bindings to reproduce results from the command line version?
To Reproduce
CLI: xtb out.sdf --charge 0
Output:
Python bindings:
This python script yields the following output:
Tested on OSX and python bindings in docker container (please provide a mac version for the python bindings on conda-forge.
Expected behaviour
I'd expect the energies to be similar / identical
Additional context