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

"T/F" of PBC when reading ".xyz" datasets #169

Closed
hghermes opened this issue Feb 26, 2024 · 3 comments
Closed

"T/F" of PBC when reading ".xyz" datasets #169

hghermes opened this issue Feb 26, 2024 · 3 comments

Comments

@hghermes
Copy link

The official manual for Kliff states that the pbc of the dataset can be read as a boolean (True/False) type, but in reality, errors occur when attempting to do so.

Additional context
This can be solved by changing the 239 line of "kliff/dataset/extxyz.py

            value = [int(i) for i in value]

to

            if(all(i in ['T','F'] for i in value)):
                value = [1 if i =='T' else 0 for i in value]
            else:
                value = [int(i) for i in value]
@mjwen
Copy link
Collaborator

mjwen commented Feb 26, 2024

Thanks @hghermes !

Do you want to make a PR to fix it?

@hghermes
Copy link
Author

@mjwen
No. It's okay, thanks.
I just wanted to share a simple error and fix. Always grateful for you and KLIFF.

@mjwen
Copy link
Collaborator

mjwen commented Feb 27, 2024

Thanks for reporting! Got it fixed in #170

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