This repository contains a worked self-consistent phonon (SCPH) workflow for CaCl2 using VASP force calculations and the ALAMODE/ANPHON toolchain. It includes representative inputs, fitted force constants, cross-validation files, temperature-dependent SCPH outputs, plotting results, and a notebook that documents the full workflow.
The main entry point is:
scph-alamode-workflow.ipynb: step-by-step workflow notebook.SCPH_folder_workflow_map.png: folder map for the calculation pipeline.SCP_files/CaCl2_scph_temperature_bands.png: final temperature-dependent phonon-band comparison plot.
The workflow is organized around these stages:
- Prepare ALAMODE input templates from VASP
SPOSCARandPPOSCARfiles. - Generate harmonic displacement patterns with
alm. - Run static VASP force calculations for harmonic displacements.
- Extract harmonic force-displacement data and fit harmonic FC2.
- Generate AIMD-based random structures for anharmonic fitting.
- Run static VASP force calculations for the AIMD-random structures.
- Extract the AIMD-random force dataset.
- Use cross validation to choose sparse-regression settings.
- Fit final anharmonic force constants.
- Run ANPHON in
MODE = SCPH. - Generate temperature-dependent effective FC2 files.
- Calculate and plot temperature-dependent SCPH phonon bands.
The notebook mirrors this sequence and lists the input and output files for each step.
.
├── files/ # Template ALAMODE inputs and helper script
├── harmonic/ # Harmonic displacement, FC2 fitting, and phonon bands
├── MD/ # AIMD setup and trajectory data used for sampling
├── disp_aimd_random/ # AIMD-random static-force job folders and dataset
├── CV/ # Cross-validation input and sparse fitting results
├── FCs_files/ # Final anharmonic force-constant fit
├── SCP_files/ # SCPH inputs, effective FC2 files, and band results
├── scph-alamode-workflow.ipynb
└── SCPH_folder_workflow_map.png
Important files:
files/create_alm: generates ALAMODE template inputs fromSPOSCARandPPOSCAR.harmonic/convert_fc2.py: converts ALAMODE XML FC2 data to Phonopy-styleFORCE_CONSTANTStext format.CV/job-alamode.sh: example Slurm script for running ALAMODE cross validation on an HPC system.harmonic/CaCl2_harmonic.xml: fitted harmonic force constants.FCs_files/CaCl2_anharmonic.xml: final anharmonic force constants.SCP_files/fc2_scph_*K.xml: temperature-dependent effective FC2 files.SCP_files/CaCl2_scph_*K.bands: SCPH phonon-band data at each temperature.
The workflow assumes access to:
- VASP for AIMD and static force calculations.
- ALAMODE, including
alm,anphon,displace.py,extract.py, anddfc2. - Python 3 with common scientific packages:
numpymatplotliblxmlasejupyter
Example Python environment setup:
python -m venv .venv
source .venv/bin/activate
pip install numpy matplotlib lxml ase jupyterALAMODE executable paths can be supplied through ALAMODE_ROOT before running
the notebook:
export ALAMODE_ROOT=/path/to/alamode
jupyter lab scph-alamode-workflow.ipynbOpen the workflow notebook:
jupyter lab scph-alamode-workflow.ipynbThe notebook detects whether it is being run from this repository root and then uses the existing folder structure. Expensive VASP and ALAMODE production steps are written so they can be run explicitly or skipped/reused, depending on the execution switches inside the notebook.
For command-line use, representative commands are:
# Generate ALAMODE template inputs
cd files
python create_alm
# Fit harmonic force constants
cd ../harmonic
alm P42_alm.in > P42_alm.log 2>&1
# Run SCPH with ANPHON
cd ../SCP_files
anphon P42_anphon.in > P42_anphon.log 2>&1Adapt executable paths, MPI launch commands, module loads, and Slurm settings to your own cluster environment.
- The provided workflow is for the CaCl2 structure and force-constant settings stored in this repository.
- Do not mix
SPOSCAR,PPOSCAR,DFSET_*, or force-constant XML files from different structures, atom orderings, or lattice constants. *.scph_dfc2is the SCPH correction to FC2. The final temperature-dependent effective FC2 files arefc2_scph_*K.xml, generated withdfc2.- VASP
POTCARfiles are license-restricted. Check whether they should be removed or excluded before making this repository public. - Large VASP outputs such as
vasprun.xml,OUTCAR, and trajectory files can make the repository large. Consider using Git LFS or excluding regenerated raw outputs if the GitHub repository should stay lightweight.
If this workflow is used in a publication or report, cite the relevant software and methods, including VASP and ALAMODE/ANPHON. Add project-specific publication details here if applicable.
No license file is currently included. Add a LICENSE file before publishing if
you want to define how others may use or redistribute this repository.