Insufficient places before decimal point in XDATCAR and CONTCAR files for ML-FF simulations

Problems running VASP: crashes, internal errors, "wrong" results.

Moderators: Moderator, Global Moderator

Post Reply
Message
Author
julien_steffen
Newbie
Newbie
Posts: 24
Joined: Wed Feb 23, 2022 10:18 am

Insufficient places before decimal point in XDATCAR and CONTCAR files for ML-FF simulations

#1 Post by julien_steffen » Fri Jun 14, 2024 8:55 am

Dear VASP-community,

I want to report a problem, which might not directly be considered as a bug, but what is clearly not desired and seriously limits the applicability of VASP ML-FF for very long simulations or those of gas molecules, if no workarounds are used.
In XDATCAR and CONTCAR files, only two spaces are between two columns of coordinates, like:

Direct configuration= 1
0.58238717 0.27578987 0.66531124
0.54632176 0.96395053 0.49697418
....

This is usually no problem in AIMD runs, but for ML-FF runs of liquid or gaseous systems with millions of steps, it almost certainly happens at some time that some of the atoms have moved through a couple of unit cells in x or y direction (in case of a surface slab, what we usually simulate). If an atom for example moved through 10 unit cells to negative direction, the respective line looks like this:

0.54632176-10.96395053 0.49697418

Since the space is now missing, the CONTCAR copied to a POSCAR to continue a run is of course no longer readable for VASP and the spaces need to be removed manually. If an XDATCAR shall be analyzed by a script, for example to calculate diffusion coefficients, the calculation fails for the same reason. Currently, we use a workaround to interpret the columns as characters of fixed length and manually introduce some spaces between them before starting the actual analysis.
If even longer calculations of gas phase species are done, at some point also movements in a positive direction lead to the problem:

0.54632176100.96395053 0.49697418

For negative numbers larger than 100, the format totally breaks, which makes any workaround impossible:

0.54632176***************** 0.49697418


It would be really helpful for us and certainly also for other people working on similar systems if the print format for the CONTCAR and XDATCAR files could be slightly changed in case of ML-FF simulations such that more than two spaces exist between two columns.

Best wishes,
Julien

pedro_melo
Global Moderator
Global Moderator
Posts: 111
Joined: Thu Nov 03, 2022 1:03 pm

Re: Insufficient places before decimal point in XDATCAR and CONTCAR files for ML-FF simulations

#2 Post by pedro_melo » Mon Jun 17, 2024 3:22 pm

Dear Julien,

Thank you for bringing this up to our attention. We will seek to provide a solution to this issue in the next version of VASP.

Kind regards,
Pedro

Post Reply