Modify the default multiplicity to be None in `CP2K` calculator
Checklist
-
I have read the contribution guidelines. -
Unit tests have been added for any new or changed code, and the test suite passes. Note: Your request will likely not be merged without the appropriate tests. -
New features and API Changes are described in doc/releasenotes.rst
. -
"closes #XXXX" is in the body of the MR description to link the related issue, if applicable.
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).