Problem with phonopy, cp2k_input_tools and transitions #105
Description
I have found an error message when building supercells with atomic displacements using a combination of phonopy (2.23.1, 2.24.1, 2.24.2), cp2k_input_tools (0.9.1, 0.8.2, 0.7.2, 0.6.0, etc) and transitions (0.8.11, 0.7.2, 0.7.0, etc), also python versions 3.8 and 3.12. I do not understand the error message below, so I will appreciate any suggestions. Thanks.
pereira@debye:~/WORK/CP2K/Force% phonopy --cp2k -c aGST_ENERGY_FORCE.inp -d --dim 1 1 1
_
_ __ | |__ ___ _ __ ___ _ __ _ _
| '_ | '_ \ / _ | '_ \ / _ \ | '_ | | | |
| |) | | | | () | | | | () || |) | || |
| .__/|| ||___/|| ||___() ./ _, |
|| || |/
2.23.1
Compiled with OpenMP support (max 8 threads).
Python version 3.12.3
Spglib version 2.3.1
Traceback (most recent call last):
File "/opt/homebrew/Caskroom/miniforge/base/envs/phonopy/bin/phonopy", line 45, in
main(**argparse_control)
File "/opt/homebrew/Caskroom/miniforge/base/envs/phonopy/lib/python3.12/site-packages/phonopy/cui/phonopy_script.py", line 1853, in main
cell_info = get_cell_info(settings, cell_filename, log_level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniforge/base/envs/phonopy/lib/python3.12/site-packages/phonopy/cui/phonopy_script.py", line 1641, in get_cell_info
cell_info = collect_cell_info(
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniforge/base/envs/phonopy/lib/python3.12/site-packages/phonopy/cui/collect_cell_info.py", line 142, in collect_cell_info
unitcell, optional_structure_info = read_crystal_structure(
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniforge/base/envs/phonopy/lib/python3.12/site-packages/phonopy/interface/calculator.py", line 472, in read_crystal_structure
unitcell, config_tree = read_cp2k(cell_filename)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniforge/base/envs/phonopy/lib/python3.12/site-packages/phonopy/interface/cp2k.py", line 78, in read_cp2k
tree = parser.parse(fhandle)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniforge/base/envs/phonopy/lib/python3.12/site-packages/cp2k_input_tools/parser.py", line 215, in parse
self._parse_as_keyword(line)
File "/opt/homebrew/Caskroom/miniforge/base/envs/phonopy/lib/python3.12/site-packages/cp2k_input_tools/parser.py", line 149, in _parse_as_keyword
kw = Keyword.from_string(kw_node, kw_value, self._key_trafo) # the key_trafo is needed to mangle keywords
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniforge/base/envs/phonopy/lib/python3.12/site-packages/cp2k_input_tools/keyword_helpers.py", line 106, in from_string
tokens = tokenize(vstring)
^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniforge/base/envs/phonopy/lib/python3.12/site-packages/cp2k_input_tools/tokenizer.py", line 129, in tokenize
char_map.get(char, tokenizer.token_char)(string, colnr)
File "/opt/homebrew/Caskroom/miniforge/base/envs/phonopy/lib/python3.12/site-packages/transitions/core.py", line 405, in trigger
return self.machine._process(func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniforge/base/envs/phonopy/lib/python3.12/site-packages/transitions/core.py", line 1079, in _process
return trigger()
^^^^^^^^^
File "/opt/homebrew/Caskroom/miniforge/base/envs/phonopy/lib/python3.12/site-packages/transitions/core.py", line 421, in _trigger
raise MachineError(msg)
transitions.core.MachineError: "Can't trigger event quote_char from state comment!"