Open cw-tan opened 1 year ago
Thanks, I've reproduced this and will look into it.
Okay I understand now. To use the deft object explicitly (the electron density), one needs to import pydeft
, and to do that you need profess/build/external/deft
in your PYTHONPATH, in addition to profess/build
. Does that fix things for you?
Even if so, I'm going to leave the issue open until I come up with a better solution.
That makes sense - it works now. From a user perspective, I think it might be cleaner if we don't have to interact with DEFT at all. Is there an easy way to make sure that anything that comes out of a system.get()
type function is always a Numpy array? This may be more intuitive and simplify post-processing grid-based quantities. (related to #10). I'm happy to have a go if you have any ideas (maybe making edits at the pybind
scripts?)
Agree completely, but if I remember correctly it's a bit subtle, unfortunately.
When I was testing out the example on the PROFESS website where we optimize the density of fcc Al and plot its electron density, I faced some errors involving the
deft
array types.Minimal code to reproduce the error:
Error message:
Trying
den = system.electron_density[...]
still results in the same error. Not sure if this is a result of the updatedpybind11
, or something about my system.Versions:
python --version
givesPython 3.10.8
cmake --version
givescmake version 3.22.1
gfortran --version
givesGNU Fortran (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 ...