lucydot / effmass

Calculates various definitions of effective mass from the electronic bandstructure of a semiconductor.
https://effmass.readthedocs.io/en/latest/
MIT License
70 stars 38 forks source link

FHI-AIMS: ValueError #41

Closed MariaEstRo closed 3 years ago

MariaEstRo commented 3 years ago

Hello. Running effmass with FHI-AIMS (version 200112.2) outputs is giving me the following error:

Traceback (most recent call last): File "/usr/bin/effmass", line 8, in sys.exit(cli()) File "/home/esteve/.local/lib/python3.6/site-packages/effmass/cli.py", line 83, in cli data = inputs.DataAims(pathname) File "/home/esteve/.local/lib/python3.6/site-packages/effmass/inputs.py", line 541, in init self.CBM = extrema._calc_CBM(occupancy, energies) File "/home/esteve/.local/lib/python3.6/site-packages/effmass/extrema.py", line 46, in _calc_CBM return np.amin(energy_unoccupied) File "<__array_function__ internals>", line 6, in amin File "/usr/lib64/python3.6/site-packages/numpy/core/fromnumeric.py", line 2831, in amin keepdims=keepdims, initial=initial, where=where) File "/usr/lib64/python3.6/site-packages/numpy/core/fromnumeric.py", line 85, in _wrapreduction return reduction(axis=axis, out=out, passkwargs) File "/usr/lib64/python3.6/site-packages/numpy/ma/core.py", line 5701, in min axis=axis, out=out, kwargs).view(type(self)) File "/usr/lib64/python3.6/site-packages/numpy/core/_methods.py", line 43, in _amin return umr_minimum(a, axis, None, out, keepdims, initial, where) ValueError: zero-size array to reduction operation minimum which has no identity

Could you tell me how to solve this problem, please?

Thank you in advance.

MatthiasGolomb commented 3 years ago

Hi Maria, can you tell me whether you installed with via pip or source code? It would also be great if you could attach your in- and output files for me to recreate the error.

MariaEstRo commented 3 years ago

Hello. I am using effmas 2.1.0 and I installed it via pip. I attach my inputs and outputs files. Thank you in advance. effmass_error.zip

MatthiasGolomb commented 3 years ago

I just ran your files and it worked for me, so I assume that it is related to issue #38 - the fix is pushed to the repo already, but not yet in pip it seems. Can you try to clone the repo and install from source and let me know if that works for you?

MariaEstRo commented 3 years ago

Hello. Cloning the repo and installing from the source worked for me. Thank you for your help.

MatthiasGolomb commented 3 years ago

That's great to hear!

lucydot commented 3 years ago

Thanks @MatthiasGolomb for the fix and @MariaEstRo for flagging the problem up. Apologies it has taken me a little time to update the changes on PyPI, but the latest version (2.2.0) is uploaded now, so this problem should be fixed with the latest version downloaded with pip install effmass. I'm closing the issue.