[ase-users] error of using ase.calculators.vasp module

Shuang Leung sleung1924 at gmail.com
Tue Apr 14 14:51:35 CEST 2020


Hello, ASE friends.

I tried to use VaspChargeDensity() function to read the 'PARCHG' file
(which has the same format as 'CHGCAR'), but an error arised, as shown
below:

"""
Traceback (most recent call last):
  File "STM-2Dscan.py", line 88, in <module>
    vasp_charge = VaspChargeDensity('PARCHG')
  File
"/home/yinyr/.local/lib/python3.6/site-packages/ase-3.20.0b1-py3.6.egg/ase/calculators/vasp/vasp.py",
line 789, in __init__
    self.read(filename)
  File
"/home/yinyr/.local/lib/python3.6/site-packages/ase-3.20.0b1-py3.6.egg/ase/calculators/vasp/vasp.py",
line 883, in read
    self._read_chg(f, chgdiff, atoms.get_volume())
  File
"/home/yinyr/.local/lib/python3.6/site-packages/ase-3.20.0b1-py3.6.egg/ase/calculators/vasp/vasp.py",
line 813, in _read_chg
    sep=' ')
ValueError: could not broadcast input array from shape (68) into shape (280)
"""

This error only occurred when the spin polarized calculation was performed
(ISPIN = 2 was set in INCAR). And when I closed the spin (ISPIN = 1), the
calculated PARCHG file can be read successfully. I also tested other small
atomic systems, however, this error didn't appeared again regardless of
whether spin was set or not. So, is there any limitation for a large system
(my calculated model has more than 300 atoms) when using the
VaspChargeDensity() function? The ase-3.19.1 version was installed in my
OS. I will be very appreciated if you could give me some advices.

Best wishes,
Shuang Leung
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20200414/266b5c1d/attachment.html>


More information about the ase-users mailing list