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_dsfs_plot.sh 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #! /bin/zsh
  2. # For given N (L) and k_fact (multiple of kF/4), this
  3. # produces an interactive (tunable c_int) plot for S(k, \omega)
  4. # from data produced from `build_LiebLin_c_scan_k_fixed[_dsfs]` scripts.
  5. if [[ $# -ne 6 ]]; then
  6. echo "Arguments needed: whichDSF, kBT, target_sumrule, N, nk (momentum in units of kF/4), width."
  7. exit 1
  8. fi
  9. if [[ $1 != 'd' && $1 != 'g' && $1 != 'o' ]]; then
  10. echo "Only the d, g and o scanning options are implemented."
  11. exit 1
  12. fi
  13. if [[ $2 -lt 0 ]]; then
  14. echo "Temperature kBT must be > 0."
  15. exit 1
  16. fi
  17. if [[ $3 -lt 0 || $3 -gt 1 ]]; then
  18. echo "Requirement: 0 < target_sumrule < 1."
  19. exit 1
  20. fi
  21. if [[ $4 -lt 0 ]]; then
  22. echo "N must be > 0."
  23. exit 1
  24. fi
  25. if [[ $5 -lt 0 ]]; then
  26. echo "nk must be > 0."
  27. exit 1
  28. fi
  29. if [[ $6 -lt 0 ]]; then
  30. echo "width 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. width=$6
  39. correlator='rho-rho'
  40. if [[ $whichDSF == 'o' ]]; then
  41. correlator='psidag-psi'
  42. elif [[ $whichDSF == 'g' ]]; then
  43. correlator='psi-psidag'
  44. fi
  45. iK=$(($nk * $N/8))
  46. Max_Secs=3600
  47. refine=0
  48. #clist=(1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625 0.03125 0.015625)
  49. # List of interactions: fractional powers of 2
  50. clist_raw=()
  51. for nc in {-128..128}
  52. do
  53. clist_raw=($clist_raw $(( 4 * 2**($nc/16.) )))
  54. done
  55. # Now cast the integer values to true integers
  56. zmodload zsh/mathfunc
  57. clist=()
  58. for c in $clist_raw
  59. do
  60. if [[ $((floor($c))) == $((ceil($c))) ]]; then
  61. clist=($clist $((int($c))))
  62. else
  63. clist=($clist $c)
  64. fi
  65. done
  66. basedir="$(pwd)"
  67. echo '** Starting run for N = '$N
  68. dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_scan/k_fixed/k_'${(l:2::0:)nk}'kFo4/sr_'$target_sumrule'/store/plots'
  69. mkdir -p $dir
  70. cd $dir
  71. plot_c_scan_k_fixed_dsfs.py $N $width
  72. cd $basedir
  73. echo ' Successfully computed DSFs for N = '$N'.\n'