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

Parsing comments in input file #9

Open
oashour opened this issue Nov 7, 2023 · 0 comments
Open

Parsing comments in input file #9

oashour opened this issue Nov 7, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@oashour
Copy link
Collaborator

oashour commented Nov 7, 2023

Comments in the namelists are parsed fine thanks to f90nml. Currently, there are problems parsing input files where there are comments on the same lines as cards, e.g.,

ATOMIC_POSITIONS (crystal) ! This comment will break the parser
Sr  0.0000000000  0.5000000000  0.1472157319  0  0  1
Sr  0.5000000000  0.0000000000  0.1472157319  0  0  1
O   0.5000000000  0.5000000000  0.1504404400  0  0  1
Sr  0.5000000000  0.5000000000  0.1870680122  0  0  1
Pb  0.0000000000  0.0000000000  0.1870152141  0  0  1

Or if there are comments between cards

CELL_PARAMETERS (angstrom)
   5.199787799   0.000000000   0.000000000
   0.000000000   5.199787799   0.000000000
   0.000000000   0.000000000  66.644654204
! This comment will also break the parser
ATOMIC_POSITIONS (crystal) 
Sr  0.0000000000  0.5000000000  0.1472157319  0  0  1
Sr  0.5000000000  0.0000000000  0.1472157319  0  0  1
O   0.5000000000  0.5000000000  0.1504404400  0  0  1

This should be easy to fix.

@oashour oashour added the bug Something isn't working label Nov 7, 2023
@oashour oashour self-assigned this Nov 7, 2023
@oashour oashour changed the title Comments in input file Parsing comments in input file Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant