#! /bin/bash

x=$1
codes=../../../codes/eneden
data=../prep

# generate Ajb_200_031.H.npy default use 8 cpu cores
python $codes/prepare_Ajb.cpu.py $data/$x.scf.h5 $data/FCIDUMP_int2el.npy $data/$x.npz 0,70000 200_031.H.npy

# generate mp2_amp.npy mp3_amp.npy mp4_amp.npy (t_n) default use 8 cpu cores
python $codes/int2el_mp2-pytorch.cpu.py $data/$x.scf.h5 $data/FCIDUMP_int2el.npy
python $codes/int2el_mp3-pytorch.cpu.py $data/$x.scf.h5 $data/FCIDUMP_int2el.npy
python $codes/int2el_mp4-pytorch.cpu-j.mat.py $data/$x.scf.h5 $data/FCIDUMP_int2el.npy 

# generate energy density for H
for n in 2 3 4
do
  echo "Calculated PT$n:"
  python $codes/Ajb_mpn.pytorch.py $data/$x.scf.h5 mp${n}_amp.npy Ajb_200_031.H.npy $data/$x.npz 0,70000 200_031.H.mp${n}.npy
done
