Skip to content

Commit

Permalink
Use md5 for unique hash.
Browse files Browse the repository at this point in the history
  • Loading branch information
shyuep committed Jan 24, 2025
1 parent 7e7756e commit ef5321b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pymatgen/io/vasp/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

import hashlib
import itertools
import math
import os
Expand Down Expand Up @@ -869,7 +870,7 @@ def get_computed_entry(
if entry_id is None:
calc_date = re.sub(" ", "", self.generator["DATE"])
calc_time = self.generator["TIME"]
hashed_structure = hash(str(self.final_structure))
hashed_structure = hashlib.md5(str(self.final_structure).encode("utf-8")).hexdigest() # noqa: S324

entry_id = f"vasprun-{calc_date}-{calc_time}-{hashed_structure}"
param_names = {
Expand Down

0 comments on commit ef5321b

Please sign in to comment.