code: def _parse_trajectory(self, out_folder):
          
          fname = self.node.load_process_class()._DEFAULT_RESTART_FILE_NAME  # pylint: disable=protected-access
          if fname not in out_folder._repository.list_object_names():  # pylint: disable=protected-access
              raise Exception  # not every run type produces a trajectory
  
          # read restart file
          abs_fn = os.path.join(out_folder._repository._get_base_folder().abspath, fname)  # pylint: disable=protected-access
          with io.open(abs_fn, mode="r", encoding="utf-8") as fobj:
              content = fobj.read()
  
          # parse coordinate section
          match = re.search(r'\n\s*&COORD\n(.*?)\n\s*&END COORD\n', content, DOTALL)
          coord_lines = [line.strip().split() for line in match.group(1).splitlines()]
          symbols = [line[0] for line in coord_lines]
          positions_str = [line[1:] for line in coord_lines]
          positions = np.array(positions_str, np.float64)
  
          # parse cell section
          match = re.search(r'\n\s*&CELL\n(.*?)\n\s*&END CELL\n', content, re.DOTALL)
          cell_lines = [line.strip().split() for line in match.group(1).splitlines()]
          cell_str = [line[1:] for line in cell_lines if line[0] in 'ABC']
          cell = np.array(cell_str, np.float64)
  
          # create StructureData
          atoms = ase.Atoms(symbols=symbols, positions=positions, cell=cell)
          return StructureData(ase=atoms)
docs: CP2K trajectory parser