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

Michael Joseph Waters michael.j.waters at northwestern.edu
Mon Apr 20 20:37:21 CEST 2020


Hi Shuang Leung,

This error will occur when ASE stops reading the grid values before getting enough to match the expected grid dimensions. Hence the mismatch.

I don't know of any size limitations. Do your PARCHG files only have one grid in them or is there chgdiff grid too? The error is on reading the chgdiff part of the file. (https://gitlab.com/ase/ase/-/blob/master/ase/calculators/vasp/vasp.py#L883)

A simple thing we should check is did the file write correctly? Is it the expected size for this calculation? If so, what is the tail of the file?

Best,
-Mike
________________________________
From: ase-users-bounces at listserv.fysik.dtu.dk <ase-users-bounces at listserv.fysik.dtu.dk> on behalf of sleung1924 via ase-users <ase-users at listserv.fysik.dtu.dk>
Sent: Saturday, April 18, 2020 7:29 PM
To: ase-users <ase-users at listserv.fysik.dtu.dk>
Subject: [ase-users] error of using ase.calculators.vasp module

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

________________________________
发自我的iPhone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20200420/b671950c/attachment.html>


More information about the ase-users mailing list