When creating PW input files for systems that contain heavy elements (e.g. Po, At, Rn, ...), for which ASE has no defined atomic mass (i.e. NaN in ase/data/__init__.py), a string "nan" is written to the input file. This causes pw.x to crash.
Since the correct mass for these elements is typically not needed, I'd propose the following quick fix:
In __init__.py, line 798 change the following code region
self.specdict = {}
for i,s in dic.values():
self.specdict[s] = specobj(s = s.strip('0123456789'), #chemical symbol w/o index
mass = masses[i], #<=== THIS LINE
magmom = magmoms[i],
U = Ulist[i],
J = Jlist[i],
to
mass = masses[i] if masses[i]>0. else 0.0, #<=== NEW LINE
This will substitute 0.0 for unknown masses, which allows pw to run through.
Possible issues arise if old python versions don't support the something if some-condition else something-else syntax.
When creating PW input files for systems that contain heavy elements (e.g. Po, At, Rn, ...), for which ASE has no defined atomic mass (i.e. NaN in
ase/data/__init__.py
), a string "nan" is written to the input file. This causes pw.x to crash.Since the correct mass for these elements is typically not needed, I'd propose the following quick fix: In
__init__.py
, line 798 change the following code regionto
This will substitute 0.0 for unknown masses, which allows pw to run through.
Possible issues arise if old python versions don't support the
something if some-condition else something-else
syntax.