Skip to content

run.pl (AIRSS Convex Hull Plotting Script)

Author: Lin Ziyue


1. Copy Required Structure Files

  1. List structures and copy selected .res (or .param) files to current folder:

    ca -m -de <threshold>
    

  2. Copy .res files obtained from AIRSS search to test directory:

    cp *.res test/
    

  3. Also copy corresponding initial .cell and .param files to test.

1.1 Keep Only Most Stable Stoichiometry

ca -f *** -r -t | awk '{print $1".res"}' | xargs cp -t tmp/

2. Optional Quick Filtering Method (Can Skip)

# List points within 0.05 eV of convex hull and delete other .res files
ca -m -de 0.05 --delete
  1. Copy .res files to test:

    cp *.res test/
    

  2. Delete structures with single atom energy difference greater than 0.04 eV (0.04 can be adjusted as needed):

    ca -m -de 0.04 -r --delete
    

  3. Increase K-point density in cell and add pressure; in param, increase cutoff energy and add:

    WRITE_CIF_STRUCTURE : true
    
    This directly generates CIF files without needing VESTA conversion.

  4. Continuously calculate all structures in test via run.pl:

    run.pl -mpinp 8 -keep
    

  5. Compare enthalpy values of structures; the lowest enthalpy is the most stable structure.

2.1 Create tmp Folder and Copy Candidate Structures

mkdir -p tmp
ca -m -de 0.05 | awk '{print $1".res"}' | xargs cp -t tmp/

Select top 10 stable structures for a specific stoichiometry:

ca -m | sort -n -k 6 -k 5 | head -n 10 | awk '{print $1".res"}' | xargs cp -t tmp/


3. Increase Calculation Accuracy

  1. In initial .cell file, increase K-point density (e.g., change from 0.07 to 0.03), and set pressure at the end.

  2. In .param file, increase cutoff energy.


4. Submit PBS Job

runpl.pbs example:

1
2
3
4
5
6
7
8
9
#!/bin/bash
#PBS -q CT1
#PBS -l nodes=1:ppn=12
#PBS -j oe
#PBS -V
#PBS -N run.pl

cd "$PBS_O_WORKDIR"
run.pl -mpinp 12

Submit job:

qsub runpl.pbs


5. View Results

After calculation completion:

  • Each structure's corresponding .res file contains final K-point grid and cutoff energy.
  • jobs.txt records structures that have completed optimization.

Notes

  1. .res files generated on some servers may contain blank lines, causing ca -m / ca -s to display abnormally. Fix with:

    sed -i '/^$/d' *.res
    

  2. Plot convex hull with elements A and B as reference lines:

    ca -m -1 A -2 B | sort -n -k 6 -k 5