Add script to build Lieb-Liniger catalogue
This commit is contained in:
förälder
d419d933d1
incheckning
6e9d25338a
|
@ -0,0 +1,65 @@
|
|||
#! /bin/zsh
|
||||
|
||||
# We use zsh here to support floats (not supported in bash)
|
||||
|
||||
# This script produces a whole stack of subdirectories,
|
||||
# for a range of values of c centered on 4 with 8 up/down factors of 2,
|
||||
# and momenta in multiples of kF/4 from 1 to 16.
|
||||
|
||||
# For each combination c/k, the LiebLin_Catalogue_Fixed_c_k_Nscaling
|
||||
# executable is invoked.
|
||||
|
||||
|
||||
if [[ $# -ne 4 ]]; then
|
||||
echo "Arguments needed: whichDSF, kBT, target_sumrule, nr_minutes (for each c, k combination)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $1 != 'd' && $1 != 'g' && $1 != 'o' ]]; then
|
||||
echo "Only the d, g and o scanning options are implemented."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $2 -lt 0 ]]; then
|
||||
echo "Temperature kBT must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $3 -lt 0 || $3 -gt 1 ]]; then
|
||||
echo "Requirement: 0 < target_sumrule < 1."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $4 -lt 1 ]]; then
|
||||
echo "Please give a positive nr_minutes."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
zmodload zsh/datetime
|
||||
|
||||
whichDSF=$1
|
||||
kBT=$2
|
||||
target_sumrule=$3
|
||||
|
||||
logfile='run-'$(strftime '%Y-%m-%d-%Hh%m')'.log'
|
||||
touch $logfile
|
||||
|
||||
clist=(1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625 0.03125 0.015625)
|
||||
|
||||
basedir="$(pwd)"
|
||||
|
||||
|
||||
for c in $clist
|
||||
do
|
||||
for nk in {1..16}
|
||||
do
|
||||
echo 'Starting run for c =' $c', kfact = '$nk | tee -a $logfile
|
||||
dir='c_'$c'/kBT_'$kBT'/k_fixed/k_'${(l:2::0:)nk}'kFo4/sr_'$target_sumrule
|
||||
echo $dir
|
||||
mkdir -p $dir
|
||||
cd $dir
|
||||
LiebLin_Catalogue_Fixed_c_k_Nscaling $whichDSF $c $nk $kBT $target_sumrule 0 1 | tee -a $basedir/$logfile
|
||||
cd $basedir
|
||||
echo ' Successfully completed run for c =' $c', kfact = '$nk'\n' | tee -a $logfile
|
||||
done
|
||||
done
|
Laddar…
Referens i nytt ärende