hdnnpy.format.xyz.parse_xyz

hdnnpy.format.xyz.parse_xyz(file_path, save=True, verbose=True)[source]

Parse a xyz format file and bunch structures by the same tag.

Parameters:
  • file_path (Path) – File path to parse.
  • save (bool, optional) – If True, save the structures bunched by the same tag into files. Otherwise, save into temporarily files.
  • verbose (bool, optional) – Print log to stdout.
Returns:

2-element tuple containing:

  • tag_xyz_map (dict): Tag to file path mapping.
  • elements (list [str]):
    All elements contained in the parsed file.

Return type:

tuple