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

Shuang Leung sleung1924 at gmail.com
Tue May 5 18:02:42 CEST 2020


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.
My VASP version is 5.4.4.

Best,
Shuang Leung


Michael Joseph Waters via ase-users <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
> )
>
> 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
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20200506/a329835e/attachment.html>


More information about the ase-users mailing list