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

VASP POSCAR format #365

Open
seatonullberg opened this issue Sep 9, 2020 · 3 comments
Open

VASP POSCAR format #365

seatonullberg opened this issue Sep 9, 2020 · 3 comments

Comments

@seatonullberg
Copy link

I was surprised to see VASP's structure file format not listed in the supported formats. The format is notoriously underspecified but the official reference can be found here. I would be happy to contribute if someone is not already working on it.

@Luthaf
Copy link
Member

Luthaf commented Sep 9, 2020

We don't support POSCAR yet, but it would make for a great addition! Nobody is working on it at the moment AFAIK.

It seems to be a free-form line oriented text format, so it would be a child class of TextFormat in chemfiles, doing the reading/writing through a TextFile, and you might be interested in the scan function to extract whitespace separated values. Let me know if you have any more questions!

@seatonullberg
Copy link
Author

Thanks to all the contributors for making such thorough documentation! One question I do have, however, is how to add data files to test the new format implementation?

@Luthaf
Copy link
Member

Luthaf commented Sep 10, 2020

That's something we still have to document. The files live in https://github.com/chemfiles/tests-data, so you can make a PR there. Then, they are downloaded in

# Update this value if you need to update the data file set
set(TESTS_DATA_GIT "268c5ec327b4c704597f78f9effa0bb1efb3c299")
if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/data/${TESTS_DATA_GIT}")
message(STATUS "Downloading test data files")
file(DOWNLOAD
"https://github.com/chemfiles/tests-data/archive/${TESTS_DATA_GIT}.tar.gz"
"${CMAKE_CURRENT_BINARY_DIR}/${TESTS_DATA_GIT}.tar.gz"
SHOW_PROGRESS
EXPECTED_HASH SHA1=fdfd48b32e97b9abf7da4ad8d29c0cde87271a48
)

So you can update the git SHA1 & hash to update the downloaded files. They are finally accessible in tests at the data/xxx/zzz.xyz path.

The idea of having a separate repository for data files allow to decrease the size of the main repository, which is nice for users that might not want to run tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants