Skip to content

Commit

Permalink
TrajectoryData doesn't support numbers in atomic names (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpignedoli committed Mar 16, 2024
1 parent b4f4de5 commit 580021f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aiida_cp2k/parsers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
###############################################################################
"""AiiDA-CP2K output parser."""

import re

import ase
import numpy as np
from aiida import common, engine, orm, parsers, plugins
Expand Down Expand Up @@ -128,7 +130,7 @@ def _read_stdout(self):
def _parse_trajectory(self, structure):
"""CP2K trajectory parser."""

symbols = [str(site.kind_name) for site in structure.sites]
symbols = [re.sub(r"\d+", "", str(site.kind_name)) for site in structure.sites]

# Handle the positions trajectory
xyz_traj_fname = self.node.process_class._DEFAULT_TRAJECT_XYZ_FILE_NAME
Expand Down

0 comments on commit 580021f

Please sign in to comment.