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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #! /bin/zsh
  2. # We use zsh here to support floats (not supported in bash)
  3. # This script produces the .dsf files for the runs from `build_LiebLin_catalogue_k_fixed`
  4. # runs which achieved the required sumrule saturation.
  5. if [[ $# -ne 4 ]]; then
  6. echo "Arguments needed: whichDSF, kBT, target_sumrule, 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 "width must be > 0."
  23. exit 1
  24. fi
  25. whichDSF=$1
  26. kBT=$2
  27. target_sumrule=$3
  28. width=$4
  29. correlator='rho-rho'
  30. if [[ $whichDSF == 'o' ]]; then
  31. correlator='psidag-psi'
  32. elif [[ $whichDSF == 'g' ]]; then
  33. correlator='psi-psidag'
  34. fi
  35. clist=(1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625 0.03125 0.015625)
  36. basedir="$(pwd)"
  37. for c in $clist
  38. do
  39. for nk in {1..16}
  40. do
  41. # ommin is set to zero for all
  42. ommin=0
  43. # ommax is set to about 2x the Tonks-Girardeau dispersion at this momentum:
  44. # w_TG = k^2 + 2\pi n |k| with k=2pi*iK/L and iK=nk*N/8, so (with N=L) k=pi/4 nk and
  45. # w_TG = pi^2/16 nk^2 + pi^2/2 nk = pi^2 nk (nk/16 + 1/2)
  46. # We take pi^2 -> 8 for convenience, so 2*w_TG is about
  47. ommax=$(($nk*($nk + 8)))
  48. # Number of points:
  49. Nom=1000
  50. echo 'Starting computation of DSFs for c =' $c', kfact = '$nk
  51. dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_fixed/c_'$c'/k_fixed/k_'${(l:2::0:)nk}'kFo4/sr_'$target_sumrule'/store/data'
  52. cd $dir
  53. for datadir in *
  54. do
  55. cd $datadir
  56. N=${datadir#"N_"}
  57. iK=$(($nk * $N/8))
  58. Smoothen_LiebLin_DSF_Scaled $whichDSF $c $N $N $iK $iK $kBT 0 $ommin $ommax $Nom $width
  59. cd ..
  60. done
  61. cd $basedir
  62. echo ' Successfully computed DSFs for c =' $c', kfact = '$nk'\n'
  63. done
  64. done