# unknown > This skill automates the complete workflow for running VASP DFT calculations on structures generated by [OgreInterface](https://github.com/caizefeng/OgreInterface), from setup to energy extraction. - Author: Chenbo Min - Repository: chamber523/ogre-dft-workflow-skill - Version: 20260130122646 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/chamber523/ogre-dft-workflow-skill - Web: https://mule.run/skillshub/@@chamber523/ogre-dft-workflow-skill~unknown:20260130122646 --- # Ogre DFT Workflow Skill A DFT calculation workflow designed for **Vibe Coding**. Built on top of [OgreInterface](https://github.com/caizefeng/OgreInterface) for epitaxial interface modeling. ## Overview Run DFT calculations for all structure files generated by OgreInterface located in: - `PES/poscars` - `zdist/poscars` - `reference/poscars` Extract the final energies from the calculations and save them into the corresponding `energies.npy` files. The order of the energies in each `.npy` file matches the order of the POSCAR file suffixes. **Note:** For `reference/energies.npy`, the array is structured as `[E1, E2, E3, E4]` where: - E1 = film slab - E2 = substrate slab - E3 = film double slab - E4 = substrate double slab ## Directory Structure ``` ogre-dft-workflow/ ├── scripts/ │ ├── 1_setup_calculations.sh # Setup calculation directories │ ├── 2_update_dipol.py # Update DIPOL values │ ├── 3_submit_jobs.sh # Submit jobs to SLURM │ ├── 4_extract_energies.py # Extract energies from OUTCAR │ ├── 5_create_npy.py # Create NPY array │ ├── setup_reference_folders.py # Setup reference calculations (E1-E4) │ └── sort_poscar_elements.py # Sort POSCAR atoms by element type └── templates/ # Reference files for your system ├── POTCAR # Your pseudopotential file ├── INCAR_template # Your INCAR with DIPOL = PLACEHOLDER_DIPOL, MAGMOM = (manual) ├── KPOINTS_template # Your KPOINTS settings └── job_template.slurm # Your SLURM script ``` ## Vibe Coding Usage This workflow is designed for AI-assisted coding tools like **Claude Code**, **Cursor**, etc. ### Typical Workflow 1. Use [vaspkit](https://vaspkit.com/) to prepare template files (`POTCAR`, `KPOINTS`, `INCAR_template`) 2. Drag your calculation folder (`pes` or `zdist`) into the AI coding environment 3. ni> "Setup calculation folders, update DIPOL, and submit jobs" The AI will execute the appropriate scripts automatically. ## Script Details ### 1_setup_calculations.sh - Creates calc_XXXX directories - Copies files from `templates/` to each directory - Usage: `./1_setup_calculations.sh ` - ``: "pes" or "zdist" - ``: Directory containing POSCAR_0000, POSCAR_0001, etc. ### 2_update_dipol.py - Calculates mass-weighted center of mass from POSCAR - Updates DIPOL tag in all INCAR files - Options: `--force`, `--verbose`, `--dry-run` ### 3_submit_jobs.sh - Submits jobs to SLURM queue - Options: `--dry-run`, `--delay N`, `--check-dipol` ### 4_extract_energies.py - Extracts energies from OUTCAR files - Outputs: `energies_YYYYMMDD_HHMMSS.csv` ### 5_create_npy.py - Creates `energies.npy` from extracted energies ### setup_reference_folders.py - Creates reference calculation directories (calc_0000 to calc_0003) - Interface energy formula: `E_interface = E_total - (E1 + E2) + 0.5*(E3 + E4)` ### sort_poscar_elements.py - Sorts POSCAR files to group atoms by element type ## Workflow Summary ``` OgreInterface This Workflow │ │ ▼ ▼ Generate POSCARs ──────────► 1. Setup calculations 2. Update DIPOL 3. Submit VASP jobs 4. Wait for completion 5. Extract energies → energies.npy ``` ## License MIT ## Acknowledgments - [OgreInterface](https://github.com/caizefeng/OgreInterface) - Epitaxial interface generation