Bug in poscar parser with single character/number in lines #206
Replies: 1 comment
-
This seems like a bug. I converted the discussion here to an issue #207 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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
Beta Was this translation helpful? Give feedback.
All reactions