Bug/fix read model behavior for missing version line
This MR hardens read_model's handling of malformed nep.txt files, found via fuzz
testing in the GPUMD repo.
read_modelnow validatesversion/types/model_typeup front, so anep.txtmissing its leadingnep*line fails with a clear error instead of aKeyError.read_modelnow rejects non-finite (inf/nan) cutoff values with a clear error instead of anOverflowErroror an opaqueValueErrorfromint().- Converted the checks that validate untrusted
nep.txt/nep.restartcontent inread_model,_get_nep_contents,_get_restart_contents, and_sort_descriptor_parametersfromasserttoraise ValueError/raise IOError, sinceassertis stripped underpython -Oand would silently skip validation of external input. Checks guarding calorine's own internal invariants are left asassert. - Added tests covering the missing-version-line and non-finite-cutoff cases.