deepmodeling / deepmodeling/dftio
[Code scan] Fix VASP tutorial commands and parsed output paths
- Dominant language
- Jupyter Notebook
- Stars
- 16
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
This issue comes from a Codex global repository scan.
## Problem
The VASP quickstart points `--root` at a single calculation directory and uses an empty prefix:
https://github.com/deepmodeling/dftio/blob/c9d128f24a74ef2911e1a28f5640357488beb196/docs/user-guide/quickstart.md#L21-L28
The parser discovers calculations with `glob(os.path.join(root, '*' + prefix + '*'))`:
https://github.com/deepmodeling/dftio/blob/c9d128f24a74ef2911e1a28f5640357488beb196/dftio/io/parse.py#L64-L67
With `--root example/vasp/GaAs --prefix ""`, discovery returns files like `EIGENVAL` and `POSCAR`, then the VASP parser tries to read `EIGENVAL/POSCAR`:
https://github.com/deepmodeling/dftio/blob/c9d128f24a74ef2911e1a28f5640357488beb196/dftio/io/vasp/vasp_parser.py#L25-L28
The band tutorial has the same root issue and also omits `--eigenvalue`:
https://github.com/deepmodeling/dftio/blob/c9d128f24a74ef2911e1a28f5640357488beb196/docs/tutorials/plot_bands.md#L16-L21
The docs also describe a top-level `0.dat`, but `write_dat()` creates `./cell.dat`, `kpoints.npy`, and `eigenvalues.npy`:
https://github.com/deepmodeling/dftio/blob/c9d128f24a74ef2911e1a28f5640357488beb196/dftio/io/parse.py#L251-L267
`dftio band -r ./parsed_data` points one directory too high, and the plot file is `band_structure.png`:
https://github.com/deepmodeling/dftio/blob/c9d128f24a74ef2911e1a28f5640357488beb196/dftio/plot/plot_eigs.py#L60-L91
## Suggested fix
Use a command like `--root example/vasp --prefix GaAs --eigenvalue`, document the generated `.0` subdirectory, and point `dftio band -r` at that subdirectory. Update the expected plot filename to `band_structure.png`.
Contributor guide
Assessment
This issue has not been assessed yet.