From 02e611b35303107d3aca1fe73a880f071f9dae51 Mon Sep 17 00:00:00 2001 From: Jia-Xin Zhu Date: Mon, 8 May 2023 10:54:40 +0800 Subject: [PATCH] fix bug in reading cp2k/output of cp2k v9.1 (compatible with old ver) --- dpdata/cp2k/output.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dpdata/cp2k/output.py b/dpdata/cp2k/output.py index 13d5be7c7..230c3defb 100644 --- a/dpdata/cp2k/output.py +++ b/dpdata/cp2k/output.py @@ -417,6 +417,12 @@ def get_frames(fname): # get the coord block info if coord_flag: + if idx == coord_idx + 1: + if ii == "\n": + pass + else: + coord.append(ii.split()[4:7]) + atom_symbol_idx_list.append(ii.split()[1]) if idx > coord_idx + 1: if ii == "\n": coord_flag = False