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.sh 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #! /bin/zsh
  2. # For given N (L) and k_fact (multiple of kF/4), this
  3. # computes the smoothened dsfs for a `build_LiebLin_c_scan_k_fixed` run.
  4. if [[ $# -ne 6 ]]; then
  5. echo "Arguments needed: whichDSF, kBT, target_sumrule, N, nk (momentum in units of kF/4), width."
  6. exit 1
  7. fi
  8. if [[ $1 != 'd' && $1 != 'g' && $1 != 'o' ]]; then
  9. echo "Only the d, g and o scanning options are implemented."
  10. exit 1
  11. fi
  12. if [[ $2 -lt 0 ]]; then
  13. echo "Temperature kBT must be > 0."
  14. exit 1
  15. fi
  16. if [[ $3 -lt 0 || $3 -gt 1 ]]; then
  17. echo "Requirement: 0 < target_sumrule < 1."
  18. exit 1
  19. fi
  20. if [[ $4 -lt 0 ]]; then
  21. echo "N must be > 0."
  22. exit 1
  23. fi
  24. if [[ $5 -lt 0 ]]; then
  25. echo "nk must be > 0."
  26. exit 1
  27. fi
  28. if [[ $6 -lt 0 ]]; then
  29. echo "width must be > 0."
  30. exit 1
  31. fi
  32. whichDSF=$1
  33. kBT=$2
  34. target_sumrule=$3
  35. N=$4
  36. nk=$5
  37. width=$6
  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. iK=$(($nk * $N/8))
  45. ommin=0
  46. ommax=$(($nk*($nk + 8)))
  47. Nom=1000
  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. for c in $clist
  68. do
  69. echo '** Starting computation of DSFs for c =' $c', N = '$N
  70. 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
  71. cd $dir
  72. Smoothen_LiebLin_DSF_Scaled $whichDSF $c $N $N $iK $iK $kBT 0 $ommin $ommax $Nom $width
  73. cd $basedir
  74. echo ' Successfully computed DSFs for c =' $c', N = '$N'.\n'
  75. done