ValueError: zero-size array to reduction operation maximum which has no identity

Hello everyone,

This is my first time using AMSET and I got this error by “amset wave”. The structure is bulk silicon.
FYI, I’m using vasp/5.3.3. The KPOINTS are 11111 and ENCUT is set to 300 (I also tried much lower ENCUT, lower KPOINTS and even tried AMSET on another machine).
I appreciate your help.

Best,
Mohammad

******* Getting wavefunction coefficients *******

Including bands 2—6

invalid value encountered in true_divide
******* Automatically choosing plane wave cutoff *******
Traceback (most recent call last):
  File "/home/mohammad/.local/bin/amset", line 33, in <module>
    sys.exit(load_entry_point('amset', 'console_scripts', 'amset')())
  File "/home/mohammad/.local/lib/python3.7/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/mohammad/.local/lib/python3.7/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/mohammad/.local/lib/python3.7/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/mohammad/.local/lib/python3.7/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/mohammad/.local/lib/python3.7/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/mohammad/2-Apps/15-AMSET/amset-main/amset/tools/wavefunction.py", line 104, in wave
    ibands, planewave_cutoff, ikpoints, **kwargs
  File "/home/mohammad/2-Apps/15-AMSET/amset-main/amset/tools/wavefunction.py", line 129, in _wavefunction_vasp
    wf, iband=ibands, ikpoints=ikpoints, n_samples=2000, std_tol=0.02
  File "/home/mohammad/2-Apps/15-AMSET/amset-main/amset/wavefunction/vasp.py", line 182, in get_converged_encut
    wavefunction, encut=max_encut, pbar=False, iband=iband, ikpoints=ikpoints
  File "/home/mohammad/2-Apps/15-AMSET/amset-main/amset/wavefunction/vasp.py", line 60, in get_wavefunction_coefficients
    pbar=pbar,
  File "/home/mohammad/2-Apps/15-AMSET/amset-main/amset/wavefunction/vasp.py", line 80, in _get_spin_wavefunction_coefficients
    indices_map = np.full(np.max(valid_indices) + 1, -1, dtype=int)
  File "<__array_function__ internals>", line 6, in amax
  File "/home/mohammad/.local/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 2734, in amax
    keepdims=keepdims, initial=initial, where=where)
  File "/home/mohammad/.local/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 87, in _wrapreduction
    return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation maximum which has no identity

Hi Mohammed,

This is unusual. Please can you send me your vasprun.xml, OUTCAR, and WAVECAR files for the smallest k-point mesh you tried.

Best,
Alex

Hi Alex,

Thank you for your fast response. Please take a look at the outputs here.
I look forward to hearing from you.

Best,
Mohammad

Hi Mohammad,

Thanks for sending the files.

I managed to find this issue. AMSET uses pymatgen to load the VASP WAVECAR file. It seems the loading is broken for your version of VASP (5.3.3) as it doesn’t read the reciprocal lattice from the WAVECAR correctly.

I tried using the same INCAR, KPOINTS, POSCAR, and POTCAR but with VASP 5.4.4 and it worked successfully. Therefore my only recommendation is that you use a more recent version of VASP.

Apologies for the inconvenience.

Best,
Alex