[ase-users] Reading Formula from CONTCAR
Janne Blomqvist
janne.blomqvist at aalto.fi
Wed Apr 24 22:52:14 CEST 2013
On 2013-04-24 15:44, Gaël Donval wrote:
>> The ase vasp io code can write both 4.x and 5.x version files, although one needs to call ase.io.vasp.write_vasp() directly - there is a keyword argument 'vasp5' specifying whether the format should be 5.x. It defaults to False.
>>
>> In case most users are using 5.x these days I suppose a case can be made for making the 5.x format the default? OTOH vasp 5.x IIRC can parse 4.x POSCAR files, whereas the opposite is not possible.
>
> It's already in the SVN trunk. The CONTCAR reader tries to read VASP 5
> format and if it fails, it falls back to the old VASP 4 format.
I know, since I wrote it; from the svn log:
------------------------------------------------------------------------
r2645 | jblomqvist | 2012-06-08 14:08:40 +0300 (Fri, 08 Jun 2012) | 2 lines
Provide an optional argument to write out a VASP 5.x POSCAR format file.
------------------------------------------------------------------------
r2644 | jblomqvist | 2012-06-08 13:57:19 +0300 (Fri, 08 Jun 2012) | 7 lines
Use VASP 5.x information about atomic symbols if available.
In the VASP 5.x POSCAR format the most reliable way to determine the
atomic symbols is to use the information on the fifth line in the
file. Thus, fall back to the various heuristics only after we detect
that we're reading a VASP 4.x format POSCAR file.
------------------------------------------------------------------------
> See https://wiki.fysik.dtu.dk/ase/download.html#latest-stable-release
> for the installation but use the tarball given there:
> https://wiki.fysik.dtu.dk/ase/download.html#latest-development-release
Thanks; though I haven't been active in ase development for a while, I
still tend to run the latest trunk. Old habits die hard, I suppose.
--
Janne Blomqvist
>
More information about the ase-users
mailing list