From 0a49a4db589db75badcc771f08b6ab612abc5ba5 Mon Sep 17 00:00:00 2001 From: Koen Draijer <124170375+KMdraijer@users.noreply.github.com> Date: Tue, 11 Feb 2025 15:22:40 +0100 Subject: [PATCH] Update de.py for pymatgen > v2021.3.4 With the v2021.3.4 update of pymatgen, the majority of basic functionalities have been moved to pymatgen.core. This means aevo is no longer comaptible with newer pymatgen version. By importing the Structure class from pymatgen.core, the issue should be fixed --- aevo/de.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aevo/de.py b/aevo/de.py index 35f5fab..158ca72 100755 --- a/aevo/de.py +++ b/aevo/de.py @@ -16,6 +16,7 @@ import hashlib import numpy as np import pymatgen as mg +from pymatgen.core import Structure from pymatgen.io.vasp.inputs import Poscar __author__ = "Alexander Urban" @@ -673,7 +674,7 @@ def write_trial(self, trial, filename=None, directory='.', frmt='vasp'): print(" writing file: {}".format(filename)) # pymatgen specific - s = mg.Structure(lattice=self.avec, species=types, coords=coords) + s = Structure(lattice=self.avec, species=types, coords=coords) p = Poscar(structure=s) p.write_file(filename)