Has something significant changed with pymatgen recently? I’m trying to set up MP-compatible VASP input files, and I have scripts that do things along the lines of (starting from an ase.atoms.Atoms
object atoms
)
s = IStructure(atoms.cell, atoms.numbers, atoms.positions, coords_are_cartesian=True)
static = MPRelaxSet(structure=s, user_incar_settings={'LWAVE': False,
'LCHARG': False,
'LAECHG': False,
'LVHAR': False,
'POTCAR_FUNCTIONAL': 'PBE_54',
'POTCAR': {'Yb': 'Yb_3', 'W': 'W_sv'},
'ALGO': 'normal'})
static.write_input(f"run_mp_{atoms_ind}")
and they used to run fine, but now I get
Traceback (most recent call last):
File "/home/cluster/bernstei/src/work/MACE/foundations/OMOL_gpu_benchmark/./setup_tests", line 27, in <module>
static.write_input(f"run_mp_{atoms_ind}")
File "/home/cluster/bernstei/pymatgen/lib/python3.11/site-packages/pymatgen/io/vasp/sets.py", line 366, in write_input
vasp_input = self.get_input_set(potcar_spec=potcar_spec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cluster/bernstei/pymatgen/lib/python3.11/site-packages/pymatgen/io/vasp/sets.py", line 475, in get_input_set
raise ValueError("Either structure or prev_dir must be set")
ValueError: Either structure or prev_dir must be set
This is with pymatgen
installed from pypi, version 2025.6.14
,
Any idea what might be going on?