[ase-users] Keep ordering of POSCAR file
Ambarish Kulkarni
arkulkarni245 at gmail.com
Tue Aug 25 18:06:44 CEST 2015
Hello,
I had faced the same issue while running vasp NEBs with ase. I had a
specific order of atoms that I wanted to retain, to distinguish different
atom types (framework, reactant, products etc).
My approach was to modify the source code and create an list of symbols
that accounts for repeating atoms. For example,
A A A A B B A A C C C A A would become
A B A C A
The corresponding POTCAR would have multiple entries corresponding to atom
A. I can share the code if you are interested, but it's not the most
cleanly written code. Essentially, I had to replace the dict variable
chemical_symbols by a list and use it further for making the POTCARs.
Currently, my hack is incompatible with special_setups.
I do believe that this is an useful functionality to have within ASE, as
reordering of atoms is commonly detrimental while running NEBs. One reason
being that currently ase/vasp does not run NEBs in parallel. This requires
using the native vasp/vtst, where reordering causes issues.
I hope this helps!
Thanks,
Ambar
On Tue, Aug 25, 2015 at 8:11 AM, Eric Hermes <ehermes at chem.wisc.edu> wrote:
> 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
>
> _______________________________________________
> 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/20150825/9ac1324e/attachment.html>
More information about the ase-users
mailing list