We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I wrote the nuclear repulsion in a TREXIO file. The nuclear repulsion computed by quantum package is
* Nuclear repulsion energy 9.189533758614488
I store it in a TREXIO file, and when I read it back in Python I get:
trexio.read_nucleus_repulsion(f) 9.189534187316895
The value given by Python is the same with both the text and the HDF5 back-ends.
When I inspect the text files produced by the text backend, I can see that the value of the nuclear repulsion is correct:
nucleus_repulsion 9.1895337586144876e+00
So I believe there is a conversion from float64 to float32 in the python interface after reading, but I could not figure out where it comes from...
It seems that I get the problem only for scalars. Arrays seem to be OK.
The text was updated successfully, but these errors were encountered:
Note: When I read the value in C, it is correct.
#include <trexio.h> #include <stdio.h> int main() { trexio_exit_code rc; trexio_t* trexio_file = trexio_open("h2o_dz.h5", 'r', TREXIO_AUTO, &rc); double rep; rc = trexio_read_nucleus_repulsion(trexio_file, &rep); printf("%25.20f\n", rep); }
$ ./a.out 9.18953375861448762407
Sorry, something went wrong.
@scemama You can try to replace the following line with the following %apply double *OUTPUT { double* const num}; and re-install the Python API
%apply double *OUTPUT { double* const num};
Thanks! It works! :-)
Fixes #116
0d37dcd
c23bc20
q-posev
No branches or pull requests
I wrote the nuclear repulsion in a TREXIO file. The nuclear repulsion computed by quantum package is
I store it in a TREXIO file, and when I read it back in Python I get:
The value given by Python is the same with both the text and the HDF5 back-ends.
When I inspect the text files produced by the text backend, I can see that the value of the nuclear repulsion is correct:
So I believe there is a conversion from float64 to float32 in the python interface after reading, but I could not figure out where it comes from...
It seems that I get the problem only for scalars. Arrays seem to be OK.
The text was updated successfully, but these errors were encountered: