pyiron_atomistics icon indicating copy to clipboard operation
pyiron_atomistics copied to clipboard

Problems_in_collecting_VASP_magnetic_moments

Open sourabh27 opened this issue 2 years ago • 1 comments

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;

  1. 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

  1. By changing the few lines in the base.py file (below)

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)

sourabh27 avatar Jan 02 '23 13:01 sourabh27

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.

https://github.com/pyiron/pyiron_atomistics/issues/915

jan-janssen avatar Jan 02 '23 14:01 jan-janssen