QCSchema Error handling
Describe the bug
When running GFNFF in the public QCArchive via QCEngine we have hit some errors but we unable to view the error message as creating the QCElemental atomic result seems to raise a validation error (see the message below). I think any time xtb fails and the return_result is set to 0 it needs to just be the correct length to be reshaped by the validator here and should depend on the driver requested. A full list of optimization IDS with the issue can be found here.
To Reproduce
Our xtb worker conda environment can be found here.
The error message from a gredient calculation is:
File "/home/chodera/miniconda/envs/qcfractal/lib/python3.7/site-packages/xtb/qcschema/harness.py", line 208, in run_qcschema return qcel.models.AtomicResult(**ret_data, stdout=output) File "pydantic/main.py", line 346, in pydantic.main.BaseModel.init pydantic.error_wrappers.ValidationError: 1 validation error for AtomicResult return_result cannot reshape array of size 1 into shape (3) (type=value_error)
The inputs are recorded in the public QCArchive the dataset with the issues is a Torsiondrivedataset with the name OpenFF-benchmark-ligand-fragments-v1.0.
Expected behaviour
The error message should be recorded in the result.
Thanks for testing the QCEngine integration of xtb. I'm happy to see that GFN1-xTB and GFN2-xTB seem to work reliably via the API.
GFN-FF instead it is currently only supported experimentally via the xtb C-API, therefore this project provides an interface but it is not yet as stable or robust as the tight binding methods. This means I cannot guarantee that the C-API will actually be able to propagate errors back correctly to the caller side in case of GFN-FF calculations, which is quite unfortunate.
For the GFN-FF to work reliably in QCEngine there is definitely some work required in the C-API of xtb first.
Yes, they have worked fantastically so thanks for making this possible!
I see, please let me know if you would like help to pull down the optimizations and run them locally to try and reproduce the errors if this would help the development.