[ase-users] VASP calculator fix for python3.4
Евгений Васильевич Тихонов
e.tikhonov at physics.msu.ru
Thu May 18 12:44:32 CEST 2017
Dear ase developers,
Current VASP code does not work, because some things were changed in
python3.
File "/usr/lib64/python3.4/site-packages/ase/calculators/vasp.py", line 692
if self.int_params['ibrion'] > -1
This is supposed to give False if self.int_params['ibrion'] is None, but
will crash with TypeError because in python3 you can no longer compare None
and int.
You need to add default value -1 for 'ibrion' if nsw = 0 or -1, or 0
otherwise.
In line 1192
potfile = open('POTCAR' + suffix, 'wb')
This will crash in python3 as well, need to change fie open mode to 'w'
Please review the fix attached.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20170518/9965ea01/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vasp.py
Type: application/x-chimera
Size: 84717 bytes
Desc: not available
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20170518/9965ea01/attachment-0001.bin>
More information about the ase-users
mailing list