123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- #! /bin/zsh
-
- # For given N (L) this
- # produces an interactive (tunable c_int) plot for S(k, \omega)
- # from data produced from `build_LiebLin_c_scan_k_range[_dsfs]` scripts.
-
- if [[ $# -ne 6 ]]; then
- echo "Arguments needed: whichDSF, kBT, target_sumrule, N, nkmax (max momentum in units of kF/4), width."
- 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 0 ]]; then
- echo "N must be > 0."
- exit 1
- fi
-
- if [[ $5 -lt 0 ]]; then
- echo "nkmax must be > 0."
- exit 1
- fi
-
- if [[ $6 -lt 0 ]]; then
- echo "width must be > 0."
- exit 1
- fi
-
-
- whichDSF=$1
- kBT=$2
- target_sumrule=$3
- N=$4
- nkmax=$5
- width=$6
-
- correlator='rho-rho'
- if [[ $whichDSF == 'o' ]]; then
- correlator='psidag-psi'
- elif [[ $whichDSF == 'g' ]]; then
- correlator='psi-psidag'
- fi
-
- iKmax=$(($nkmax * $N/8))
-
- Max_Secs=3600
- refine=0
-
- #clist=(1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625 0.03125 0.015625)
-
- # List of interactions: fractional powers of 2
- clist_raw=()
- for nc in {-128..128}
- do
- clist_raw=($clist_raw $(( 4 * 2**($nc/16.) )))
- done
- # Now cast the integer values to true integers
- zmodload zsh/mathfunc
- clist=()
- for c in $clist_raw
- do
- if [[ $((floor($c))) == $((ceil($c))) ]]; then
- clist=($clist $((int($c))))
- else
- clist=($clist $c)
- fi
- done
-
- basedir="$(pwd)"
-
- echo '** Starting run for N = '$N
- dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_scan/k_range/k_0_to_'${(l:2::0:)nkmax}'kFo4/sr_'$target_sumrule'/store/plots'
- mkdir -p $dir
- cd $dir
- plot_c_scan_k_range_dsfs.py $N $width
- cd $basedir
- echo ' Successfully computed DSFs for N = '$N'.\n'
|