# potpack **Repository Path**: ms2lab/potpack ## Basic Information - **Project Name**: potpack - **Description**: A tool for archiving and recovering POTCAR files. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-17 - **Last Updated**: 2026-01-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # PotPack A tool for archiving and recovering POTCAR files. ## Features - **Dump**: Archive all POTCAR files in a directory structure into a single list file - **Recover**: Restore POTCAR files from the archive list file ## Installation ```bash curl -sL https://gitee.com/ms2lab/PotPack/raw/main/install.sh | bash ``` ## Usage ### Dump To archive POTCAR files: ```bash potpack dump [-t, --type ] > potcar.list ``` Examples: ```bash # Without type specification potpack dump test-potcar > potcar.list # With type specification potpack dump test-potcar -t PBE.64 > potcar.list ``` Output format: ``` # TYPE = PBE.64 (only present if type is specified) test-potcar/sub1/POTCAR Li_sv C test-potcar/sub2/POTCAR H He ``` ### Recover To recover POTCAR files from the archive: ```bash potpack recover -p, --pot [-d, --dir ] ``` Examples: ```bash # Recover to current directory potpack recover potcar.list -p /path/to/potpaw_PBE.64/ # Recover to specified directory potpack recover potcar.list --pot /path/to/potpaw_PBE.64/ --dir recover_output ``` ## Requirements - Bash shell - Python 3 (for relative path calculation) - Common Unix tools: find, grep, sed, cat, mkdir ## Project Structure ``` dump-potcar/ ├── src/ │ └── potpack.sh # Main script └── README.md # This README file ``` ## How it works 1. **Dump**: Uses `find` to locate all POTCAR files, extracts element information from the TITEL lines, and generates a list file with relative paths and elements. If the `--type` parameter is provided, it adds a header line `# TYPE = `. 2. **Recover**: Reads the list file, ignores lines starting with `#`, creates the necessary directory structure, and concatenates the appropriate POTCAR files from the specified potpaw directory. If the `--dir` parameter is provided, it recovers files to the specified directory instead of the current directory.