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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #! /bin/zsh
  2. # We use zsh here to support floats (not supported in bash)
  3. # This script produces a whole stack of subdirectories,
  4. # for a range of values of c centered on 4 with 8 up/down factors of 2,
  5. # and momenta in range from 0 to 4kF.
  6. # For each c, the LiebLin_Catalogue_Fixed_c_Nscaling
  7. # executable is invoked, which computes up to the highest N possible in view of time.
  8. if [[ $# -ne 5 ]]; then
  9. echo "Arguments needed: whichDSF, kBT, target_sumrule, nkmax (max momentum in units of kF/4), nr_minutes (for each c value)."
  10. exit 1
  11. fi
  12. if [[ $1 != 'd' && $1 != 'g' && $1 != 'o' ]]; then
  13. echo "Only the d, g and o scanning options are implemented."
  14. exit 1
  15. fi
  16. if [[ $2 -lt 0 ]]; then
  17. echo "Temperature kBT must be > 0."
  18. exit 1
  19. fi
  20. if [[ $3 -lt 0 || $3 -gt 1 ]]; then
  21. echo "Requirement: 0 < target_sumrule < 1."
  22. exit 1
  23. fi
  24. if [[ $4 -lt 0 ]]; then
  25. echo "nkmax must be > 0."
  26. exit 1
  27. fi
  28. if [[ $5 -lt 1 ]]; then
  29. echo "Please give a positive nr_minutes."
  30. exit 1
  31. fi
  32. zmodload zsh/datetime
  33. whichDSF=$1
  34. kBT=$2
  35. target_sumrule=$3
  36. nkmax=$4
  37. nr_minutes=$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_catalogue_k_range_'$whichDSF'_kBT_'$kBT'_sr_'$target_sumrule'_nkmax_'$nkmax'_nr_minutes_'$nr_minutes'_'$(date '+%Y-%m-%d-%Hh%M')'.log'
  46. touch $logfile
  47. clist=(1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625 0.03125 0.015625)
  48. basedir="$(pwd)"
  49. for c in $clist
  50. do
  51. echo '** Starting run for c =' $c | tee -a $logfile
  52. dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_fixed/c_'$c'/k_range/k_0_to_'$nkmax'kFo4/sr_'$target_sumrule'/prelim'
  53. mkdir -p $dir
  54. cd $dir
  55. LiebLin_Catalogue_Fixed_c_Nscaling $whichDSF $c $nkmax $kBT $target_sumrule 0 $nr_minutes | tee -a $basedir/$logfile
  56. cd $basedir
  57. echo '** Successfully completed run for c =' $c'.\n' | tee -a $logfile
  58. done
  59. echo '\n\n*** Successfully completed build_LiebLin_catalogue_k_range on '$(date '+%Y-%m-%d-%Hh%M') | tee -a $logfile