Skip to content

Modify the default multiplicity to be None in `CP2K` calculator

Yuji Ikeda requested to merge yuzie007/ase:fix-cp2k-pipeline into master

Checklist

Closes #1354 (closed)

After struggling, I think I have finally found the reason of the failure in the calculators pipeline failure in calculator/test_h2.py with the CP2K calculator.

In the MR !3021 (merged) (merged on Sep 18, 2023), a new keyword multiplicity has been introduced in the CP2K calculator (which is very nice!). It's default value is set to 1, which is however not compatible with the systems with odd-number electrons. This caused the error in test_h2.py, where single hydrogen atom is computed but with multiplicity=1 (not physically possible).

(Prior to !3021 (merged), multiplicity is not given explicitly in the input file, and I guess in that case CP2K automatically assigns some reasonable multiplicity depending on the system.)

To fix this issue, in the present MR, the default value is set to None. With this default value, it falls back to the original default behavior. With this the test above passes now (https://gitlab.com/yuzie007/ase/-/jobs/5432105605).

Merge request reports