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

Offermans Willem willem.offermans at vito.be
Wed May 6 15:22:05 CEST 2020


Hi Shuang Leung and ASE friends,

Maybe this ``error`` needs to be handled in a user friendly way by ASE.
It might make it much easier to discover what is going on.



Met vriendelijke groeten,
Mit freundlichen Grüßen,
With kind regards,


Willem Offermans
Researcher Electrocatalysis SCT
VITO NV | Boeretang 200 | 2400 Mol
Phone:+32(0)14335263 Mobile:+32(0)492182073

Willem.Offermans at Vito.be<mailto:Willem.Offermans at Vito.be>

[cid:982BA063-B96A-4A1B-89AB-5A01CA9FC70D at vito.local]

On 5 May 2020, at 18:02, Shuang Leung <sleung1924 at gmail.com<mailto:sleung1924 at gmail.com>> wrote:

Hi again Mike,

Sorry for replying late. I checked my PARCHG file once again and did find an error: "... -10.456   *********** -9.4432   -8.8059 ..."  One of  the grid vaules has been replaced with asterisks, and thus resulting in reading failure. This exception may come from the Fortran format statements of the VASP code which controls the output of PARCHG file. A similar example can be found here: https://stackoverflow.com/questions/15681735/fortran-splats-my-output-to-asterisks-why<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F15681735%2Ffortran-splats-my-output-to-asterisks-why&data=02%7C01%7Cwillem.offermans%40vito.be%7C40795f469975442f33c308d7f10dc6c1%7C9e2777ed82374ab992782c144d6f6da3%7C0%7C1%7C637242913796697956&sdata=d71ggorMh%2BOMzPfsw%2FalgHDkLZDBCv9PeU8oYLF03EU%3D&reserved=0>. My VASP version is 5.4.4.

Best,
Shuang Leung


Michael Joseph Waters via ase-users <ase-users at listserv.fysik.dtu.dk<mailto:ase-users at listserv.fysik.dtu.dk>> 于2020年4月21日周二 上午2:38写道:
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<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.com%2Fase%2Fase%2F-%2Fblob%2Fmaster%2Fase%2Fcalculators%2Fvasp%2Fvasp.py%23L883&data=02%7C01%7Cwillem.offermans%40vito.be%7C40795f469975442f33c308d7f10dc6c1%7C9e2777ed82374ab992782c144d6f6da3%7C0%7C1%7C637242913796707949&sdata=%2BajboBKB79OQN6Rngb9TYBuBq26wg5ndZLrvKul8870%3D&reserved=0>)

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<mailto:ase-users-bounces at listserv.fysik.dtu.dk> <ase-users-bounces at listserv.fysik.dtu.dk<mailto:ase-users-bounces at listserv.fysik.dtu.dk>> on behalf of sleung1924 via ase-users <ase-users at listserv.fysik.dtu.dk<mailto: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<mailto: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
_______________________________________________
ase-users mailing list
ase-users at listserv.fysik.dtu.dk<mailto:ase-users at listserv.fysik.dtu.dk>
https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.fysik.dtu.dk%2Fmailman%2Flistinfo%2Fase-users&data=02%7C01%7Cwillem.offermans%40vito.be%7C40795f469975442f33c308d7f10dc6c1%7C9e2777ed82374ab992782c144d6f6da3%7C0%7C1%7C637242913796707949&sdata=n2eMTjNUVHlvvnax51XgWDd7t04NRt0mfGgq%2BMdbecU%3D&reserved=0>

VITO Disclaimer: http://www.vito.be/e-maildisclaimer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20200506/5758d1d9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vito.jpg
Type: image/jpeg
Size: 15232 bytes
Desc: vito.jpg
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20200506/5758d1d9/attachment-0001.jpg>


More information about the ase-users mailing list