You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build_LiebLin_c_scan_k_fixed.sh 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. #! /bin/zsh
  2. # For given N (L) and k_fact (multiple of kF/4), this
  3. # computes the required DSF (up to required sumrule)
  4. # over a range of values of c_int.
  5. # This script cannot be restarted, it must be run as a one-off towards successful completion.
  6. # The data can then be used to produce animated graphs (with c_int evolving),
  7. # see the `build_LiebLin_c_scan_k_fixed_dsfs[_plot]` scripts, or
  8. # (better) the shortcuts `build_LiebLin_c_scan_k_fixed_set[_plots]`.
  9. if [[ $# -ne 5 ]]; then
  10. echo "Arguments needed: whichDSF, kBT, target_sumrule, N, nk (momentum in units of kF/4)."
  11. exit 1
  12. fi
  13. if [[ $1 != 'd' && $1 != 'g' && $1 != 'o' ]]; then
  14. echo "Only the d, g and o scanning options are implemented."
  15. exit 1
  16. fi
  17. if [[ $2 -lt 0 ]]; then
  18. echo "Temperature kBT must be > 0."
  19. exit 1
  20. fi
  21. if [[ $3 -lt 0 || $3 -gt 1 ]]; then
  22. echo "Requirement: 0 < target_sumrule < 1."
  23. exit 1
  24. fi
  25. if [[ $4 -lt 0 ]]; then
  26. echo "N must be > 0."
  27. exit 1
  28. fi
  29. if [[ $5 -lt 0 ]]; then
  30. echo "nk must be > 0."
  31. exit 1
  32. fi
  33. whichDSF=$1
  34. kBT=$2
  35. target_sumrule=$3
  36. N=$4
  37. nk=$5
  38. correlator='rho-rho'
  39. if [[ $whichDSF == 'o' ]]; then
  40. correlator='psidag-psi'
  41. elif [[ $whichDSF == 'g' ]]; then
  42. correlator='psi-psidag'
  43. fi
  44. mkdir -p logs
  45. logfile='logs/run_c_scan_k_fixed_'$whichDSF'_kBT_'$kBT'_sr_'$target_sumrule'_N_'$N'_nk_'$nk'_'$(date '+%Y-%m-%d-%Hh%M')'.log'
  46. touch $logfile
  47. iK=$(($nk * $N/8))
  48. Max_Secs=3600
  49. refine=0
  50. #clist=(1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625 0.03125 0.015625)
  51. # List of interactions: fractional powers of 2
  52. clist_raw=()
  53. for nc in {-128..128}
  54. do
  55. clist_raw=($clist_raw $(( 4 * 2**($nc/16.) )))
  56. done
  57. # Now cast the integer values to true integers
  58. zmodload zsh/mathfunc
  59. clist=()
  60. for c in $clist_raw
  61. do
  62. if [[ $((floor($c))) == $((ceil($c))) ]]; then
  63. clist=($clist $((int($c))))
  64. else
  65. clist=($clist $c)
  66. fi
  67. done
  68. basedir="$(pwd)"
  69. for c in $clist
  70. do
  71. echo '** Starting run for c =' $c', N = '$N', k = '$nk'kF/4' | tee -a $logfile
  72. dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_scan/k_fixed/k_'${(l:2::0:)nk}'kFo4/sr_'$target_sumrule'/store/data/N_'$N'/c_'$c
  73. mkdir -p $dir
  74. cd $dir
  75. LiebLin_DSF $whichDSF $c $N $N $iK $iK $kBT $Max_Secs $target_sumrule $refine
  76. cd $basedir
  77. echo ' Successfully computed DSFs for c =' $c', N = '$N', k = '$nk'kF/4.\n' | tee -a $logfile
  78. done
  79. echo '\n\n*** Successfully completed build_LiebLin_c_scan_k_fixed on '$(date '+%Y-%m-%d-%Hh%M') | tee -a $logfile