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

Loading settings from: settings.yaml

             █████╗ ███╗   ███╗███████╗███████╗████████╗
            ██╔══██╗████╗ ████║██╔════╝██╔════╝╚══██╔══╝
            ███████║██╔████╔██║███████╗█████╗     ██║
            ██╔══██║██║╚██╔╝██║╚════██║██╔══╝     ██║
            ██║  ██║██║ ╚═╝ ██║███████║███████╗   ██║
            ╚═╝  ╚═╝╚═╝     ╚═╝╚══════╝╚══════╝   ╚═╝

                                                v0.4.11

  A. Ganose, J. Park, A. Faghaninia, R. Woods-Robinson,
  A. Jain, in prep.

amset starting on 02 Jun 2021 at 14:13


Run parameters:
  ├── scattering_type: auto
  ├── doping: [2.5e+22]
  ├── temperatures: [300]
  ├── bandgap: 1.5211
  ├── soc: False
  ├── zero_weighted_kpoints: prefer
  ├── interpolation_factor: 50
  ├── wavefunction_coefficients: wavefunction.h5
  ├── use_projections: False
  ├── free_carrier_screening: False
  ├── high_frequency_dielectric: 
  │   [[ 10.32   0.00   0.00]
  │    [  0.00  10.32   0.00]
  │    [  0.00   0.00  10.32]]
  ├── static_dielectric: 
  │   [[ 12.18   0.00   0.00]
  │    [  0.00  12.18   0.00]
  │    [  0.00   0.00  12.18]]
  ├── elastic_constant: 
  │   [[ 139.7    0.0    0.0    0.0    0.0    0.0]
  │    [   0.0  139.7    0.0    0.0    0.0    0.0]
  │    [   0.0    0.0  139.7    0.0    0.0    0.0]
  │    [   0.0    0.0    0.0   69.8    0.0    0.0]
  │    [   0.0    0.0    0.0    0.0   69.8    0.0]
  │    [   0.0    0.0    0.0    0.0    0.0   69.8]]
  ├── deformation_potential: (1.2, 8.6)
  ├── defect_charge: 1
  ├── compensation_factor: 2
  ├── pop_frequency: 8.16
  ├── energy_cutoff: 1.5
  ├── fd_tol: 0.05
  ├── dos_estep: 0.01
  ├── symprec: 0.01
  ├── nworkers: 1
  ├── cache_wavefunction: True
  ├── calculate_mobility: True
  ├── separate_mobility: True
  ├── mobility_rates_only: True
  ├── file_format: json
  ├── write_input: False
  ├── write_mesh: True
  ├── print_log: True
  └── write_log: True


~~~~~~~~~~~~~~~~~~~~~~~~~~~~ STRUCTURE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Structure information:
unicodeify_spacegroup is deprecated
These methods have been deprecated in favor of using the Stringify mix-in class, which provides to_latex_string, to_unicode_string, etc. They will be removed in v2022.
latexify_spacegroup is deprecated
These methods have been deprecated in favor of using the Stringify mix-in class, which provides to_latex_string, to_unicode_string, etc. They will be removed in v2022.
unicodeify is deprecated
These methods have been deprecated in favor of using the Stringify mix-in class, which provides to_latex_string, to_unicode_string, etc. They will be removed in v2022.
  ├── formula: WSeS
  ├── # sites: 6
  └── space group: P3m1

Lattice:
  ├── a, b, c [Å]: 3.25, 3.25, 40.00
  └── α, β, γ [°]: 90, 90, 120


~~~~~~~~~~~~~~~~~~~~~~~~~~ BAND STRUCTURE ~~~~~~~~~~~~~~~~~~~~~~~~~

Input band structure information:
  ├── # bands: 32
  ├── # k-points: 120
  ├── Fermi level: -1.032 eV
  ├── spin polarized: False
  └── metallic: False

Band gap:
  ├── indirect band gap: 0.916 eV
  ├── direct band gap: 1.103 eV
  └── direct k-point: [0.34, 0.31, 0.00]

Valence band maximum:
  ├── energy: -1.314 eV
  ├── k-point: [0.00, 0.00, 0.00]
  └── band indices: 26

Conduction band minimum:
  ├── energy: -0.398 eV
  ├── k-point: [0.34, 0.31, 0.00]
  └── band indices: 27


~~~~~~~~~~~~~~~~~~~~~~~~~~ INTERPOLATION ~~~~~~~~~~~~~~~~~~~~~~~~~~

Getting band interpolation coefficients
  └── time: 0.5012 s

Interpolation parameters:
  ├── k-point mesh: 131x131x9
  └── energy cutoff: 1.5 eV

Interpolating spin-up bands 23-30
  └── time: 1.0077 s

bandgap set to 1.521 eV, applying scissor of 0.620 eV

Generating tetrahedron mesh vertices
  └── time: 0.7050 s

Initializing tetrahedron band structure
  └── time: 1.8621 s

Initializing momentum relaxation time factor calculator

Initializing wavefunction overlap calculator

Desymmetrizing k-point mesh
  ├── Found initial mesh: 35.000 x 35.000 x 1.000
  ├── Integer mesh: 35 x 35 x 1
  └── Using 12 symmetry operations

Desymmetrizing wavefunction coefficients
  ├── progress:  100%|████████████████████████████████| 00:01<00:00
  └── time: 2.0656 s


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DOS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

DOS parameters:
  ├── emin: -4.59 eV
  ├── emax: 1.99 eV
  ├── dos weight: 2
  └── n points: 658

Generating tetrahedral DOS:
  ├── DOS:       100%|████████████████████████████████| 00:07<00:00
  └── time: 7.9694 s

Intrinsic DOS Fermi level: -0.8634 eV

DOS contains 7.973 electrons

Calculated Fermi levels:

  conc [cm⁻³]    temp [K]    E_fermi [eV]
-------------  ----------  --------------
     2.50e+22       300.0       -152.0378


  ERROR: amset exiting on 02 Jun 2021 at 14:13
Traceback (most recent call last):
  File "/home/legion/anaconda3/bin/amset", line 8, in <module>
    sys.exit(cli())
  File "/home/legion/anaconda3/lib/python3.8/site-
packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/legion/anaconda3/lib/python3.8/site-
packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/legion/anaconda3/lib/python3.8/site-
packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/legion/anaconda3/lib/python3.8/site-
packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/legion/anaconda3/lib/python3.8/site-
packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/legion/anaconda3/lib/python3.8/site-
packages/amset/tools/run.py", line 139, in run
    runner.run()
  File "/home/legion/anaconda3/lib/python3.8/site-
packages/amset/core/run.py", line 62, in run
    mem_usage, (amset_data, usage_stats) = memory_usage(
  File "/home/legion/anaconda3/lib/python3.8/site-
packages/memory_profiler.py", line 336, in memory_usage
    returned = f(*args, **kw)
  File "/home/legion/anaconda3/lib/python3.8/site-
packages/amset/core/run.py", line 114, in _run_wrapper
    amset_data, dos_time = self._do_dos(amset_data)
  File "/home/legion/anaconda3/lib/python3.8/site-
packages/amset/core/run.py", line 247, in _do_dos
    amset_data.calculate_fd_cutoffs(
  File "/home/legion/anaconda3/lib/python3.8/site-
packages/amset/core/data.py", line 289, in calculate_fd_cutoffs
    cmin, cmax = get_min_max_cutoff(weight_cumsum)
  File "/home/legion/anaconda3/lib/python3.8/site-
packages/amset/core/data.py", line 272, in get_min_max_cutoff
    min_idx = np.where(cumsum < fd_tolerance / 2)[0].max()
  File "/home/legion/anaconda3/lib/python3.8/site-
packages/numpy/core/_methods.py", line 39, in _amax
    return umr_maximum(a, axis, None, out, keepdims, initial, 
where)
ValueError: zero-size array to reduction operation maximum which 
has no identity
Dear Sir, I met this error, may I know how to fix this error?

Hi Liangzhang,

I think the issue is that your carrier concentration is too high. Can you try a smaller value, like 1e20.

Best,
Alex