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

Support reading of lists in custom xyz-files #47

Closed
YHordijk opened this issue Oct 24, 2023 · 0 comments · Fixed by #48
Closed

Support reading of lists in custom xyz-files #47

YHordijk opened this issue Oct 24, 2023 · 0 comments · Fixed by #48
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@YHordijk
Copy link
Contributor

YHordijk commented Oct 24, 2023

Currently key=value pairs only allow single values. We can extend the syntax to support lists as values as well. I propose we add support for the following:

12

C       0.00000000       1.14206764       0.90887116
C       0.00000000       1.19134753      -0.47779047
C       0.00000000       0.00000000      -1.18863009
C       0.00000000      -1.19134753      -0.47779047
C       0.00000000      -1.14206764       0.90887116
N       0.00000000       0.00000000       1.58935329
H       0.00000000       2.05493274       1.49740370
H       0.00000000       2.14479192      -0.99199860
H       0.00000000       0.00000000      -2.27369478
H       0.00000000      -2.14479192      -0.99199860
H       0.00000000      -2.05493274       1.49740370
Xx       0.12739120      -0.00077609       2.50049043

conn = 6, 12
active_atoms = 8

Currently conn will be read as '6, 12'. I think splitting on , will be the easiest way to create lists. We can then simply split the value by , first, and then parse each part again in a small list-comprehension. This should then yield conn: list[int] = [6, 12]

@YHordijk YHordijk added bug Something isn't working enhancement New feature or request labels Oct 24, 2023
@YHordijk YHordijk self-assigned this Oct 24, 2023
@YHordijk YHordijk linked a pull request Oct 24, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant