diff --git a/dpdata/cp2k/output.py b/dpdata/cp2k/output.py index f91d86045..2f5e9cc61 100644 --- a/dpdata/cp2k/output.py +++ b/dpdata/cp2k/output.py @@ -104,8 +104,8 @@ def handle_single_log_frame(self, lines): # CONSERVED QUANTITY [hartree] = -0.279168013085E+04 energy_pattern_2 = re.compile(r' POTENTIAL ENERGY\[hartree\]\s+=\s+(?P\S+)') energy=None - cell_length_pattern = re.compile(r' INITIAL CELL LNTHS\[bohr\]\s+=\s+(?P\S+)\s+(?P\S+)\s+(?P\S+)') - cell_angle_pattern = re.compile(r' INITIAL CELL ANGLS\[deg\]\s+=\s+(?P\S+)\s+(?P\S+)\s+(?P\S+)') + cell_length_pattern = re.compile(r' (INITIAL ){0,1}CELL LNTHS\[bohr\]\s+=\s+(?P\S+)\s+(?P\S+)\s+(?P\S+)') + cell_angle_pattern = re.compile(r' (INITIAL ){0,1}CELL ANGLS\[deg\]\s+=\s+(?P\S+)\s+(?P\S+)\s+(?P\S+)') cell_A, cell_B, cell_C = (0,0,0,) cell_alpha, cell_beta, cell_gamma=(0,0,0,) cell_a_pattern = re.compile(r' CELL\| Vector a \[angstrom\]:\s+(?P\S+)\s+(?P\S+)\s+(?P\S+)')