TAMkin reports an error when loading a molecule from a CP2K computation

49 views
Skip to first unread message

Wei Chen

unread,
May 6, 2022, 6:03:05 AM5/6/22
to TAMkin
Dear all,

I am new to TAMkin. To get started, I use the example “021_water_formation” to learn TAMkin.  I have modified the script “formation.py” at  loading molecule part  so that TAMkin could load  molecules from CP2K computations.

The following error was reported.

Traceback (most recent call last):
  File "formation.py", line 42, in <module>
    mol_oxygen = load_molecule_cp2k("O2-Energy.out","O2_Freq.out",is_periodic=False)
  File "/python3.10/site-packages/tamkin/io/cp2k.py", line 164, in load_molecule_cp2k
    hessian[free_indices[i2 + i1], free_indices[j]] = \
IndexError: index 3 is out of bounds for axis 0 with size 3

I am using Python 3.10, TAMkin-1.2.6 and CP2k 9.1,  I have attached all input files.

I would be very grateful if anyone could give me some advice.

Best wishes,

Wei


H2O-Energy.out
formation.py
H2_Freq.out
O2-Energy.out
O2_Freq.out
H2-Energy.out
H2O_Freq.out

Wei Chen

unread,
May 7, 2022, 4:37:19 AM5/7/22
to TAMkin
Dear all,

It is me again.

I used CP2K 5.1 to produce the input data for TAMkin,  everything went well. While, when I chose CP2K 9.1 with the same in file, TAMkin reported the error.  It seems that CP2K has somehow changed the structure of its output file.

Best wishes,

Wei

Herbert Fruchtl

unread,
Feb 7, 2024, 11:23:02 AM2/7/24
to TAMkin
Dear Wei (and others),
Your post is almost two years old, so this probably comes too late, but others may be interested. I have fixed two problems in cp2k.py that broke the code for outputs from CP2K versions >= 9. If interested, I'm happy to share this (obviously also with the developers).
  Herbert
Reply all
Reply to author
Forward
0 new messages