Skip to content

Commit ef5321b

Browse files
committed
Use md5 for unique hash.
1 parent 7e7756e commit ef5321b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pymatgen/io/vasp/outputs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
import hashlib
56
import itertools
67
import math
78
import os
@@ -869,7 +870,7 @@ def get_computed_entry(
869870
if entry_id is None:
870871
calc_date = re.sub(" ", "", self.generator["DATE"])
871872
calc_time = self.generator["TIME"]
872-
hashed_structure = hash(str(self.final_structure))
873+
hashed_structure = hashlib.md5(str(self.final_structure).encode("utf-8")).hexdigest() # noqa: S324
873874

874875
entry_id = f"vasprun-{calc_date}-{calc_time}-{hashed_structure}"
875876
param_names = {

0 commit comments

Comments
 (0)