diffpy / libdiffpy

DiffPy C++ library for calculation of PDF and other real-space quantities
Other
7 stars 13 forks source link

Unknown atom or ion symbol error #33

Open Tieqiong opened 1 month ago

Tieqiong commented 1 month ago

Description When calculating PDF from ICSD .cif files, there exists ~70k files that would raise ValueError: Unknown atom or ion symbol.

To Reproduce Take icsd_000001.cif as example. First load the file and create a structure instance using diffpy.structure, then try calculating the PDF by calling diffpy.srreal.pdfcalculator.PDFCalculator. It will raise ValueError: Unknown atom or ion symbol 'Te4+'..

Traceback The error is raised in findWKFormula function in libdiffpy. With further investigation this error occurs when the ion (atom bare symbol with atom valence) is not in the file f0_WaasKirf.dat. The file was created in 2002 (the link inside is outdated) but I found the most recent version of it on ESRF Anonymous FTP Server. The new version can't solve the issue though, as there's still no data of ions such as Te4+.

Guessing We might need to add new items in the existing file, or write functions to convert missing ion to existing entries.

Also see diffpy/diffpy.srreal#27