This repository contains scripts for managing VASP calculations on a SLURM-based cluster system.
A script for submitting and monitoring sequential VASP calculations (Relax → SC → Band → DOS).
nohup bash job_monitor.sh <calc_type> &
where <calc_type>
can be:
Relax
: Structure relaxationSC
: Self-consistent calculationBand
: Band structure calculationDOS
: Density of states calculation
structure_directory/
├── Relax/
├── SC/
├── DOS/
└── Band/
INCAR_<calc_type>
: INCAR file for each calculation typesbp_<calc_type>.sh
: SLURM submission script for each calculation typePOTCAR
: VASP pseudopotential file../aflow_sym/uniq_poscar_list
: List of structures to processdiverge_structs
: (optional) List of structures to skip
Scripts for managing optical calculations (SC → DIAG → GW0 → BSE) with automatic error checking and resubmission.
For normal execution with error checking:
nohup ./redo_optics.sh > redo_optics.log 2>&1 &
For forced restart of all calculations:
nohup ./restart_optics.sh > restart_optics.log 2>&1 &
Direct_dir
: File containing list of directories to process- INCAR files:
INCAR_SC
INCAR_DIAG
INCAR_GW0
INCAR_BSE
- SLURM submission scripts:
sbp_SC.sh
sbp_DIAG.sh
sbp_GW0.sh
sbp_BSE.sh
POTCAR_GW
: VASP GW pseudopotential file
SC
: DFT groundstate calculationDIAG
: DFT "virtual" orbitals (empty states)GW0
: RPA quasiparticles with single-shot GWBSE
: BSE calculation
structure_directory/
├── Optics/
│ ├── SC/
│ ├── DIAG/
│ ├── GW0/
│ └── BSE/
For redo_optics.sh:
optical_jobs.log
: Detailed job submission informationjob_<calc_type>.log
: Job counting logs for each calculation type
For restart_optics.sh:
restart_optical_jobs.log
: Detailed job submission information for restartsjob_<calc_type>_restart.log
: Job counting logs for restarted calculations
redo_optics.sh:
- Automatic error detection and job resubmission
- Sequential dependency handling
- Detailed logging of job submissions
- Limits concurrent jobs up to 60 computational nodes
restart_optics.sh:
- Forces restart of all calculations regardless of previous status
- Maintains same workflow and dependencies
- Uses separate log files to avoid confusion with original runs
- Limits concurrent jobs up to 60 computational nodes
- Manages sequential job submissions
- Limits concurrent jobs to 60
- Handles failed calculations
- Supports structure skipping via
diverge_structs
- Automatic directory creation and management
- Sequential dependency handling (SC → DIAG → GW0 → BSE)
- Automatic error detection and job resubmission
- Detailed logging of job submissions
- Limits concurrent jobs to 60
- Missing required files - ensure all INCAR and submission scripts are present
- Directory permissions - ensure write access in all directories
- SLURM queue limits - script will wait if queue is full
- Failed calculations - check individual VASP output files for errors
- Missing vasprun.xml - script will detect and resubmit affected calculations
- Failed phonon calculations - use get_err_phon.sh to generate resubmission script
- Both scripts assume SLURM job scheduler
- Maximum concurrent jobs is set to 60
- Scripts will create necessary directories if they don't exist
- Error handling includes automatic resubmission of failed jobs
A script for managing phonon calculations with automatic supercell generation and job monitoring.
chmod +x submit_phonon.sh
nohup ./submit_phonon.sh > nohup.out 2>&1 &
phonon_list
: File containing list of directories to processINCAR_PHON
: INCAR file for phonon calculationssbp_PHON.sh
: SLURM submission script for phonon calculations- Supporting scripts:
convert_kpath.sh
generate_supercell.sh
extract_band_conf.sh
preprocess_high_symmetry_points.sh
structure_directory/
├── Relax/
│ └── CONTCAR
└── PHON/
├── POSCAR-*
├── INCAR
├── POTCAR
└── sbp.sh
job_PHON.log
: Detailed job submission tracking- Records which phonon calculations have been submitted for each structure
- Automatic supercell generation using VASPKIT
- Batch submission (10 jobs at a time)
- Limits concurrent jobs to 50
- Resumes from last submitted job if interrupted
- Maintains submission history in log file
- Reads structures from
phonon_list
- For each structure:
- Creates PHON directory
- Copies CONTCAR from Relax directory
- Generates primitive cell using VASPKIT
- Generates supercells
- Submits jobs in batches
- Monitors job queue and maintains submission limits
- Tracks progress in log file
- Check supercell size in
generate_supercell.sh
- Monitor convergence in individual phonon calculations
- Use
job_PHON.log
to track submission progress - Check VASPKIT output for primitive cell generation
A script for post-processing phonon calculations with automatic error detection and data generation.
sbatch phonon-pp-job.sh
- Automatic error detection in SLURM output files
- Generates FORCE_SETS using phonopy
- Creates phonon band plots and raw data files
- Handles LaTeX formatting for band labels
- Detailed logging with configurable verbosity
phonon_list
: List of structures to process- Supporting scripts:
convert_kpath.sh
extract_band_conf.sh
preprocess_high_symmetry_points.sh
A script for analyzing and categorizing band structures based on their electronic properties.
./band_gap-pp.sh
- Automatically categorizes structures as Direct, Indirect, or Metallic
- Uses VASPKIT for band structure analysis
- Error detection in SLURM output files
- Generates categorized lists of structures
Direct_dir
: List of structures with direct band gapsIndirect_dir
: List of structures with indirect band gapsMetallic_dir
: List of structures with metallic/semimetallic band gaps
A utility script for handling failed phonon calculations.
./get_err_phon.sh
- Analyzes phonon post-processing logs for errors
- Generates resubmission script for failed calculations
- Handles missing or corrupted vasprun.xml files
- Automatic cleanup and job resubmission
Depending on which doping script you use, you'll need different Python packages:
For general substitution WITHOUT symmetry bias:
Example: aflow_sym/rnd_SiGe_doping.py
or aflow_sym/NaSiGe_doping.py
For using Fingerprint energy as symmetry bias:
Example: aflow_sym/Doping.py
For explicitly using group-subgroup splitting:
Example: aflow_sym/subgroup_doping.py
Ensure these environment variables are set:
$AFLOW_HOME
: Path to AFLOW executable$VASPKIT_HOME
: Path to VASPKIT executable$PHONOPY_HOME
: Path to Phonopy executable
- Structure Relaxation (
job_monitor.sh Relax
) - Electronic Structure (
job_monitor.sh SC/Band/DOS
) - Optical Properties (
redo_optics.sh
) - Phonon Calculations (
submit_phonon.sh
)