diff --git a/dpdata/cp2k/output.py b/dpdata/cp2k/output.py index 364593d5..135dd194 100644 --- a/dpdata/cp2k/output.py +++ b/dpdata/cp2k/output.py @@ -411,10 +411,10 @@ def get_frames(fname): atom_symbol_list.append(ii.split()[3]) # start to parse coords block - if "Atom Kind Element" in ii or "Atom Kind Element" in ii: + if "Atom Kind Element" in ii or "Atom Kind Element" in ii: coord_flag = True - coord_idx = idx # save start line of coord block - # parse coords lines + coord_idx = idx # save start line of coord block + # parse coords lines if coord_flag and idx > coord_idx: if ii == "\n": coord_flag = len(coord) == 0 # skip empty line at the beginning