Skip to content
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

Bug in poscar parser with single character/number in lines #207

Open
TyBalduf opened this issue Jun 27, 2023 Discussed in #206 · 1 comment
Open

Bug in poscar parser with single character/number in lines #207

TyBalduf opened this issue Jun 27, 2023 Discussed in #206 · 1 comment

Comments

@TyBalduf
Copy link
Collaborator

Discussed in #206

Originally posted by PeterBlaha June 9, 2023
Dear developers,
I guess I found a problem in the subroutine vasp.f90, or, more specifically in subroutine parse_line, when reading a poscar file (all versions 3.x; the problem did not exist in version 2.x).

The parser fails when one has only one atom type in the cell and the line contains only one single character/digit in the first column like for an elemental solid or for elements with a single character (eg. diamond Carbon). I include a poscar file for diamond, which shows the problem even twice:
C # it cannot read the name of this element
1
0.0000000000 1.8184794535 1.8184794535
1.8184794535 0.0000000000 1.8184794535
1.8184794535 1.8184794535 0.0000000000
2 # it cannot read the "2"
cartesian
0.4546198634 0.4546198634 0.4546198634
3.1823390437 3.1823390437 3.1823390437

As soon as I move the "C" to " C" and "2" to " 2", it works.
I guess, the initialization of variable iend=1 in subroutine parse_line should be changed to zero.

Best regards
Peter

@e-kwsm
Copy link
Contributor

e-kwsm commented Aug 28, 2023

Duplicate of grimme-lab/mctc-lib#60?

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

No branches or pull requests

2 participants