Skip to content

wenlingren/SCPH

Repository files navigation

CaCl2 Self-Consistent Phonon Workflow with ALAMODE

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.

Workflow Summary

The workflow is organized around these stages:

  1. Prepare ALAMODE input templates from VASP SPOSCAR and PPOSCAR files.
  2. Generate harmonic displacement patterns with alm.
  3. Run static VASP force calculations for harmonic displacements.
  4. Extract harmonic force-displacement data and fit harmonic FC2.
  5. Generate AIMD-based random structures for anharmonic fitting.
  6. Run static VASP force calculations for the AIMD-random structures.
  7. Extract the AIMD-random force dataset.
  8. Use cross validation to choose sparse-regression settings.
  9. Fit final anharmonic force constants.
  10. Run ANPHON in MODE = SCPH.
  11. Generate temperature-dependent effective FC2 files.
  12. Calculate and plot temperature-dependent SCPH phonon bands.

The notebook mirrors this sequence and lists the input and output files for each step.

Repository Layout

.
├── 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 from SPOSCAR and PPOSCAR.
  • harmonic/convert_fc2.py: converts ALAMODE XML FC2 data to Phonopy-style FORCE_CONSTANTS text 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.

Requirements

The workflow assumes access to:

  • VASP for AIMD and static force calculations.
  • ALAMODE, including alm, anphon, displace.py, extract.py, and dfc2.
  • Python 3 with common scientific packages:
    • numpy
    • matplotlib
    • lxml
    • ase
    • jupyter

Example Python environment setup:

python -m venv .venv
source .venv/bin/activate
pip install numpy matplotlib lxml ase jupyter

ALAMODE executable paths can be supplied through ALAMODE_ROOT before running the notebook:

export ALAMODE_ROOT=/path/to/alamode
jupyter lab scph-alamode-workflow.ipynb

Quick Start

Open the workflow notebook:

jupyter lab scph-alamode-workflow.ipynb

The 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>&1

Adapt executable paths, MPI launch commands, module loads, and Slurm settings to your own cluster environment.

Data Notes

  • 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_dfc2 is the SCPH correction to FC2. The final temperature-dependent effective FC2 files are fc2_scph_*K.xml, generated with dfc2.
  • VASP POTCAR files 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.

Citation

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.

License

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.

About

This notebook documents the `SCPH/` workflow: VASP force calculations, ALAMODE force-constant fitting, and ANPHON self-consistent phonon calculations. These are all input and output files helping people reproduce the results and know the workflow.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors