Skip to content

Commit

Permalink
Add Si vasprun.xml test data
Browse files Browse the repository at this point in the history
  • Loading branch information
atztogo committed Apr 29, 2024
1 parent 1a78ab9 commit 3d12c06
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
Binary file added test/Si-111-222-fd.tar.xz
Binary file not shown.
Binary file added test/Si-111-222-rd.tar.xz
Binary file not shown.
74 changes: 74 additions & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Pytest conftest.py."""

import tarfile
from pathlib import Path

import numpy as np
Expand Down Expand Up @@ -508,3 +509,76 @@ def ph_si() -> Phonopy:
log_level=1,
produce_fc=True,
)


@pytest.fixture(scope="session")
def si_111_222_fd() -> tarfile.TarFile:
"""Return Si fc3 111 fc2 222 vasp inputs.
tar.getnames()
['Si-111-222-fd',
'Si-111-222-fd/vasprun-001.xml',
'Si-111-222-fd/vasprun-015.xml',
'Si-111-222-fd/vasprun-014.xml',
'Si-111-222-fd/vasprun-000.xml',
'Si-111-222-fd/vasprun-016.xml',
'Si-111-222-fd/vasprun-002.xml',
'Si-111-222-fd/vasprun-003.xml',
'Si-111-222-fd/vasprun-013.xml',
'Si-111-222-fd/vasprun-007.xml',
'Si-111-222-fd/vasprun-fc2-000.xml',
'Si-111-222-fd/vasprun-fc2-001.xml',
'Si-111-222-fd/vasprun-006.xml',
'Si-111-222-fd/vasprun-012.xml',
'Si-111-222-fd/vasprun-004.xml',
'Si-111-222-fd/vasprun-010.xml',
'Si-111-222-fd/vasprun-011.xml',
'Si-111-222-fd/vasprun-005.xml',
'Si-111-222-fd/phono3py_disp.yaml',
'Si-111-222-fd/vasprun-008.xml',
'Si-111-222-fd/vasprun-009.xml']
member = tar.getmember("Si-111-222-fd/phono3py_disp.yaml")
tar.extractfile(member) -> byte file object
"""
tar = tarfile.open(cwd / "Si-111-222-fd.tar.xz")
return tar


@pytest.fixture(scope="session")
def si_111_222_rd() -> tarfile.TarFile:
"""Return Si fc3 111 fc2 222 vasp inputs.
tar.getnames()
['Si-111-222-rd',
'Si-111-222-rd/vasprun-001.xml',
'Si-111-222-rd/vasprun-015.xml',
'Si-111-222-rd/vasprun-014.xml',
'Si-111-222-rd/vasprun-000.xml',
'Si-111-222-rd/vasprun-016.xml',
'Si-111-222-rd/vasprun-002.xml',
'Si-111-222-rd/vasprun-003.xml',
'Si-111-222-rd/vasprun-017.xml',
'Si-111-222-rd/vasprun-013.xml',
'Si-111-222-rd/vasprun-007.xml',
'Si-111-222-rd/vasprun-fc2-000.xml',
'Si-111-222-rd/vasprun-fc2-001.xml',
'Si-111-222-rd/vasprun-006.xml',
'Si-111-222-rd/vasprun-012.xml',
'Si-111-222-rd/vasprun-004.xml',
'Si-111-222-rd/vasprun-010.xml',
'Si-111-222-rd/vasprun-fc2-002.xml',
'Si-111-222-rd/vasprun-011.xml',
'Si-111-222-rd/vasprun-005.xml',
'Si-111-222-rd/phono3py_disp.yaml',
'Si-111-222-rd/vasprun-020.xml',
'Si-111-222-rd/vasprun-008.xml',
'Si-111-222-rd/vasprun-009.xml',
'Si-111-222-rd/vasprun-019.xml',
'Si-111-222-rd/vasprun-018.xml']
member = tar.getmember("Si-111-222-rd/phono3py_disp.yaml")
tar.extractfile(member) -> byte file object
"""
tar = tarfile.open(cwd / "Si-111-222-fd.tar.xz")
return tar

0 comments on commit 3d12c06

Please sign in to comment.