Skip to content

Tweak POSCAR / XDATCAR to accommodate malformed files #4323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2025

Conversation

esoteric-ephemera
Copy link
Contributor

Related to this matsci.org issue: sometimes the XDATCAR can be malformed because fortran uses fixed format floats when printing. In those cases, there's no space between coordinates:

Direct configuration= 2
-0.63265286-0.11227753 -0.15402785
-0.12414874 -0.01213420 -0.28106824
...

In some cases, this issue is reparable (a negative sign separates coordinates). This PR implements a fix when it is reparable and adds a few Trajectory-like convenience features to Xdatcar

@shyuep shyuep merged commit eec4422 into materialsproject:master Mar 13, 2025
43 checks passed
@shyuep
Copy link
Member

shyuep commented Mar 13, 2025

Thanks.

@esoteric-ephemera esoteric-ephemera deleted the xdc2 branch May 12, 2025 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants