[ase-users] Keep ordering of POSCAR file
Eric Hermes
ehermes at chem.wisc.edu
Tue Aug 25 17:11:22 CEST 2015
Alex,
Reading in a VASP geometry file (POSCAR, CONTCAR, etc) with ASE does not reorder the atoms. Instead, it is the VASP calculator that reorders the atoms for the purpose of running the calculation. The VASP calculator only reorders the atoms internally, though, so the order of the Atoms object should not be changed after a VASP calculation. If you wish to have a final geometry (like the CONTCAR) which retains the original order of the atoms, you can simply write the Atoms object after the VASP calculation. For example:
my_system = read('POSCAR.original')
my_system.set_calculator(Vasp(...))
my_system.get_potential_energy()
write('POSCAR.final', my_system)
In this case, POSCAR.original and POSCAR.final should have the same ordering, even if the POSCAR and CONTCAR generated by the VASP calculator have a different order.
Additionally, the VASP calculator in the latest version of ASE will not re-order systems where the atoms are contiguous by element – that is, so long as your system isn’t something like “A B A” the order will not change. The reason that the VASP calculator reorders systems to be contiguous by element is due to how VASP reads in the pseudopotential. For example, if you wanted to run AIMD on a box full of water which was generated by repeating a single H2O molecule 216 times, if VASP did not reorder the system, the first line in the POSCAR would look like “H O H O H O…” with 216 “H O”s, and the POTCAR would have 432 elements in it (just H and O over and over again). Unfortunately, there is currently no way to disable this functionality in the VASP calculator.
Note that in an older version of ASE, the VASP calculator had a bug wherein the system would be reordered even if the input geometry was contiguous by element. For example, a system that was “A B C” might be reordered to “A C B”. This bug was fixed quite a while ago, and the latest stable version of ASE should not experience this issue.
Eric
From: ase-users-bounces at listserv.fysik.dtu.dk [mailto:ase-users-bounces at listserv.fysik.dtu.dk] On Behalf Of Alexander Hupfer
Sent: Tuesday, August 25, 2015 9:01 AM
To: ase-users at listserv.fysik.dtu.dk
Subject: [ase-users] Keep ordering of POSCAR file
Hi ASE Community,
thank you for making this great tool!
My Question: Is it possible to use the vasp-calculator and keep the atom order of file myposcar = read_vasp(‘myposcar’), so that the CONTCAR file
has the same ordering as the myposcar file?
This is important among others for the VASP - Transition State Toolkit where all POSCAR files must have the same ordering.
Thank you,
- Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20150825/4d42c947/attachment-0001.html>
More information about the ase-users
mailing list