Dear PYIRON Community,
I am facing a few issues in collecting the magnetic moments from the VASP simulations.
ERROR:
File "~/Apps/Test_Pyiron/lib/python3.11/site-packages/pyiron_atomistics/vasp/base.py", line 2014, in collect
magnetization = np.array(self.outcar.parse_dict["magnetization"]).copy()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (5,) + inhomogeneous part.
I did solve it by;
By downgrading the NumPy version from 1.24.1 to 1.23.4, which also requires the downgrading of pyiron_atomistics to 0.2.58.
or
By changing the few lines in the base.py file (below)
Hi @sourabh27 thank you for posting this issue. yes, we currently have issues with the latest numpy version, so downgrading the numpy version is the save decision.
Dear PYIRON Community, I am facing a few issues in collecting the magnetic moments from the VASP simulations.
ERROR: File "~/Apps/Test_Pyiron/lib/python3.11/site-packages/pyiron_atomistics/vasp/base.py", line 2014, in collect magnetization = np.array(self.outcar.parse_dict["magnetization"]).copy() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (5,) + inhomogeneous part.
I did solve it by;
or
magnetization = np.array(self.outcar.parse_dict["magnetization"]).copy final_magmoms = np.array(self.outcar.parse_dict["final_magmoms"]).copy
changes to
magnetization = np.array(self.outcar.parse_dict["magnetization"], dtype=object, copy=True) final_magmoms = np.array(self.outcar.parse_dict["final_magmoms"], dtype=object, copy=True)
Though I am not an expert in PYIRON and/or Python. Let me know about the possible corrections. Many thanks! Sourabh
(https://drive.google.com/file/d/1WMJFuSZsYTje3982L1TX0gIrgFTUjjYU/view?usp=sharing)