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_range_dsfs.sh 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #! /bin/zsh
  2. # We use zsh here to support floats (not supported in bash)
  3. # This script produces the .dsfs files for the runs from `build_LiebLin_catalogue_k_range`
  4. # runs which achieved the required sumrule saturation.
  5. if [[ $# -ne 5 ]]; then
  6. echo "Arguments needed: whichDSF, kBT, target_sumrule, nkmax (max 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 "nkmax must be > 0."
  23. exit 1
  24. fi
  25. if [[ $5 -lt 0 ]]; then
  26. echo "width must be > 0."
  27. exit 1
  28. fi
  29. whichDSF=$1
  30. kBT=$2
  31. target_sumrule=$3
  32. nkmax=$4
  33. width=$5
  34. correlator='rho-rho'
  35. if [[ $whichDSF == 'o' ]]; then
  36. correlator='psidag-psi'
  37. elif [[ $whichDSF == 'g' ]]; then
  38. correlator='psi-psidag'
  39. fi
  40. clist=(1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625 0.03125 0.015625)
  41. basedir="$(pwd)"
  42. ommin=0
  43. ommax=$(($nkmax*($nkmax - 8))) # use lower branch of 1ph continuum
  44. Nom=1000
  45. for c in $clist
  46. do
  47. echo 'Starting computation of DSFs for c =' $c
  48. dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_fixed/c_'$c'/k_range/k_0_to_'${(l:2::0:)nkmax}'kFo4/sr_'$target_sumrule'/store/data'
  49. cd $dir
  50. for datadir in *
  51. do
  52. cd $datadir
  53. N=${datadir#"N_"}
  54. iKmax=$(($nkmax * $N/8))
  55. Smoothen_LiebLin_DSF_Scaled $whichDSF $c $N $N 0 $iKmax $kBT 0 $ommin $ommax $Nom $width
  56. cd ..
  57. done
  58. cd $basedir
  59. echo ' Successfully computed DSFs for c =' $c
  60. done