Compare commits
No commits in common. "0c3ad996b0f67ed29ad4349d48a3bd3566d65b99" and "25f4b1ac284deea54ae1fd34689f5d8eac708ba8" have entirely different histories.
0c3ad996b0
...
25f4b1ac28
|
@ -4,12 +4,6 @@
|
|||
# computes the required DSF (up to required sumrule)
|
||||
# over a range of values of c_int.
|
||||
|
||||
# This script cannot be restarted, it must be run as a one-off towards successful completion.
|
||||
|
||||
# The data can then be used to produce animated graphs (with c_int evolving),
|
||||
# see the `build_LiebLin_c_scan_k_fixed_dsfs[_plot]` scripts, or
|
||||
# (better) the shortcuts `build_LiebLin_c_scan_k_fixed_set[_plots]`.
|
||||
|
||||
if [[ $# -ne 5 ]]; then
|
||||
echo "Arguments needed: whichDSF, kBT, target_sumrule, N, nk (momentum in units of kF/4)."
|
||||
exit 1
|
||||
|
@ -54,10 +48,6 @@ elif [[ $whichDSF == 'g' ]]; then
|
|||
correlator='psi-psidag'
|
||||
fi
|
||||
|
||||
mkdir -p logs
|
||||
logfile='logs/run_c_scan_k_fixed_'$whichDSF'_kBT_'$kBT'_sr_'$target_sumrule'_N_'$N'_nk_'$nk'_'$(date '+%Y-%m-%d-%Hh%M')'.log'
|
||||
touch $logfile
|
||||
|
||||
iK=$(($nk * $N/8))
|
||||
|
||||
Max_Secs=3600
|
||||
|
@ -87,13 +77,11 @@ basedir="$(pwd)"
|
|||
|
||||
for c in $clist
|
||||
do
|
||||
echo '** Starting run for c =' $c', N = '$N', k = '$nk'kF/4' | tee -a $logfile
|
||||
echo '** Starting run for c =' $c', N = '$N
|
||||
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
|
||||
mkdir -p $dir
|
||||
cd $dir
|
||||
LiebLin_DSF $whichDSF $c $N $N $iK $iK $kBT $Max_Secs $target_sumrule $refine
|
||||
cd $basedir
|
||||
echo ' Successfully computed DSFs for c =' $c', N = '$N', k = '$nk'kF/4.\n' | tee -a $logfile
|
||||
echo ' Successfully computed DSFs for c =' $c', N = '$N'.\n'
|
||||
done
|
||||
|
||||
echo '\n\n*** Successfully completed build_LiebLin_c_scan_k_fixed on '$(date '+%Y-%m-%d-%Hh%M') | tee -a $logfile
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
#! /bin/zsh
|
||||
|
||||
# Runs `build_LiebLin_c_scan_k_fixed` for nk = 1 up to nkmax.
|
||||
|
||||
if [[ $# -ne 5 ]]; then
|
||||
echo "Arguments needed: whichDSF, kBT, target_sumrule, N, nkmax (max momentum in units of kF/4)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $1 != 'd' && $1 != 'g' && $1 != 'o' ]]; then
|
||||
echo "Only the d, g and o scanning options are implemented."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $2 -lt 0 ]]; then
|
||||
echo "Temperature kBT must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $3 -lt 0 || $3 -gt 1 ]]; then
|
||||
echo "Requirement: 0 < target_sumrule < 1."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $4 -lt 0 ]]; then
|
||||
echo "N must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $5 -lt 0 ]]; then
|
||||
echo "nkmax must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
whichDSF=$1
|
||||
kBT=$2
|
||||
target_sumrule=$3
|
||||
N=$4
|
||||
nkmax=$5
|
||||
|
||||
for nk in {1..$nkmax}
|
||||
do
|
||||
build_LiebLin_c_scan_k_fixed.sh $whichDSF $kBT $target_sumrule $N $nk
|
||||
done
|
|
@ -1,54 +0,0 @@
|
|||
#! /bin/zsh
|
||||
|
||||
# Runs `build_LiebLin_c_scan_k_fixed_dsfs` and `_plots` for nk = 1 up to nkmax.
|
||||
|
||||
if [[ $# -ne 6 ]]; then
|
||||
echo "Arguments needed: whichDSF, kBT, target_sumrule, N, nkmax (max momentum in units of kF/4), width."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $1 != 'd' && $1 != 'g' && $1 != 'o' ]]; then
|
||||
echo "Only the d, g and o scanning options are implemented."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $2 -lt 0 ]]; then
|
||||
echo "Temperature kBT must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $3 -lt 0 || $3 -gt 1 ]]; then
|
||||
echo "Requirement: 0 < target_sumrule < 1."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $4 -lt 0 ]]; then
|
||||
echo "N must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $5 -lt 0 ]]; then
|
||||
echo "nkmax must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $6 -lt 0 ]]; then
|
||||
echo "width must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
whichDSF=$1
|
||||
kBT=$2
|
||||
target_sumrule=$3
|
||||
N=$4
|
||||
nkmax=$5
|
||||
width=$6
|
||||
|
||||
for nk in {1..$nkmax}
|
||||
do
|
||||
# produce dsfs files
|
||||
build_LiebLin_c_scan_k_fixed_dsfs.sh $whichDSF $kBT $target_sumrule $N $nk $width
|
||||
# produce plots
|
||||
build_LiebLin_c_scan_k_fixed_dsfs_plot.sh $whichDSF $kBT $target_sumrule $N $width
|
||||
done
|
|
@ -4,9 +4,6 @@
|
|||
# computes the required DSF (up to required sumrule)
|
||||
# over a range of values of c_int.
|
||||
|
||||
# The data can then be used to produce animated graphs (with c_int evolving),
|
||||
# see the `build_LiebLin_c_scan_k_range_dsfs[_plot]` scripts.
|
||||
|
||||
if [[ $# -ne 5 ]]; then
|
||||
echo "Arguments needed: whichDSF, kBT, target_sumrule, N, nkmax (max momentum in units of kF/4)."
|
||||
exit 1
|
||||
|
@ -51,10 +48,6 @@ elif [[ $whichDSF == 'g' ]]; then
|
|||
correlator='psi-psidag'
|
||||
fi
|
||||
|
||||
mkdir -p logs
|
||||
logfile='logs/run_c_scan_k_range_'$whichDSF'_kBT_'$kBT'_sr_'$target_sumrule'_N_'$N'_nkmax_'$nkmax'_'$(date '+%Y-%m-%d-%Hh%M')'.log'
|
||||
touch $logfile
|
||||
|
||||
iKmax=$(($nkmax * $N/8))
|
||||
|
||||
Max_Secs=3600
|
||||
|
@ -84,13 +77,11 @@ basedir="$(pwd)"
|
|||
|
||||
for c in $clist
|
||||
do
|
||||
echo '** Starting run for c =' $c', N = '$N | tee -a $logfile
|
||||
echo '** Starting run for c =' $c', N = '$N
|
||||
dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_scan/k_range/k_0_to_'${(l:2::0:)nkmax}'kFo4/sr_'$target_sumrule'/store/data/N_'$N'/c_'$c
|
||||
mkdir -p $dir
|
||||
cd $dir
|
||||
LiebLin_DSF $whichDSF $c $N $N 0 $iKmax $kBT $Max_Secs $target_sumrule $refine
|
||||
cd $basedir
|
||||
echo ' Successfully computed DSFs for c =' $c', N = '$N'.\n' | tee -a $logfile
|
||||
echo ' Successfully computed DSFs for c =' $c', N = '$N'.\n'
|
||||
done
|
||||
|
||||
echo '\n\n*** Successfully completed build_LiebLin_c_scan_k_range on '$(date '+%Y-%m-%d-%Hh%M') | tee -a $logfile
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
# for a range of values of c centered on 4 with 8 up/down factors of 2,
|
||||
# and momenta in multiples of kF/4 from 1 to 16.
|
||||
|
||||
# For each combination c & k, the LiebLin_Catalogue_Fixed_c_k_Nscaling
|
||||
# executable is invoked, which computes up to the highest N possible in view of time.
|
||||
# For each combination c/k, the LiebLin_Catalogue_Fixed_c_k_Nscaling
|
||||
# executable is invoked.
|
||||
|
||||
|
||||
if [[ $# -ne 4 ]]; then
|
||||
|
@ -50,7 +50,7 @@ elif [[ $whichDSF == 'g' ]]; then
|
|||
fi
|
||||
|
||||
mkdir -p logs
|
||||
logfile='logs/run_catalogue_k_fixed_'$whichDSF'_kBT_'$kBT'_sr_'$target_sumrule'_nr_minutes_'$nr_minutes'_'$(date '+%Y-%m-%d-%Hh%M')'.log'
|
||||
logfile='logs/run_'$whichDSF'_kBT_'$kBT'_k_fixed_sr_'$target_sumrule'_'$(date '+%Y-%m-%d-%Hh%M')'.log'
|
||||
touch $logfile
|
||||
|
||||
clist=(1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625 0.03125 0.015625)
|
||||
|
@ -71,5 +71,3 @@ do
|
|||
echo '** Successfully completed run for c =' $c', kfact = '$nk'.\n' | tee -a $logfile
|
||||
done
|
||||
done
|
||||
|
||||
echo '\n\n*** Successfully completed build_LiebLin_catalogue_k_fixed on '$(date '+%Y-%m-%d-%Hh%M') | tee -a $logfile
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# and momenta in range from 0 to 4kF.
|
||||
|
||||
# For each c, the LiebLin_Catalogue_Fixed_c_Nscaling
|
||||
# executable is invoked, which computes up to the highest N possible in view of time.
|
||||
# executable is invoked.
|
||||
|
||||
|
||||
if [[ $# -ne 5 ]]; then
|
||||
|
@ -56,7 +56,7 @@ elif [[ $whichDSF == 'g' ]]; then
|
|||
fi
|
||||
|
||||
mkdir -p logs
|
||||
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'
|
||||
logfile='logs/run_'$whichDSF'_kBT_'$kBT'_k_range_sr_'$target_sumrule'_'$(date '+%Y-%m-%d-%Hh%M')'.log'
|
||||
touch $logfile
|
||||
|
||||
clist=(1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625 0.03125 0.015625)
|
||||
|
@ -72,7 +72,5 @@ do
|
|||
cd $dir
|
||||
LiebLin_Catalogue_Fixed_c_Nscaling $whichDSF $c $nkmax $kBT $target_sumrule 0 $nr_minutes | tee -a $basedir/$logfile
|
||||
cd $basedir
|
||||
echo '** Successfully completed run for c =' $c'.\n' | tee -a $logfile
|
||||
echo '** Successfully completed run for c =' $c', kfact = '$nk'.\n' | tee -a $logfile
|
||||
done
|
||||
|
||||
echo '\n\n*** Successfully completed build_LiebLin_catalogue_k_range on '$(date '+%Y-%m-%d-%Hh%M') | tee -a $logfile
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
#! /bin/zsh
|
||||
|
||||
# We use zsh here to support floats (not supported in bash)
|
||||
|
||||
# This script produces a whole stack of subdirectories,
|
||||
# for a range of values of c centered on 4 with 8 up/down factors of 2,
|
||||
# and momenta in range from 0 to nkmax * kF/4.
|
||||
|
||||
# For each c, the LiebLin_Catalogue_Fixed_c_Nscaling
|
||||
# executable is invoked, which computes up to the highest N possible in the allocated time.
|
||||
|
||||
# This script is restartable: a new run will pick up where a previous left off,
|
||||
# provided the previous run terminated cleanly.
|
||||
|
||||
if [[ $# -ne 5 ]]; then
|
||||
echo "Arguments needed: whichDSF, kBT, target_sumrule, nkmax (max momentum in units of kF/4), nr_minutes (for each c value)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $1 != 'd' && $1 != 'g' && $1 != 'o' ]]; then
|
||||
echo "Only the d, g and o scanning options are implemented."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $2 -lt 0 ]]; then
|
||||
echo "Temperature kBT must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $3 -lt 0 || $3 -gt 1 ]]; then
|
||||
echo "Requirement: 0 < target_sumrule < 1."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $4 -lt 0 ]]; then
|
||||
echo "nkmax must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $5 -lt 1 ]]; then
|
||||
echo "Please give a positive nr_minutes."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
zmodload zsh/datetime
|
||||
|
||||
whichDSF=$1
|
||||
kBT=$2
|
||||
target_sumrule=$3
|
||||
nkmax=$4
|
||||
nr_minutes=$5
|
||||
|
||||
correlator='rho-rho'
|
||||
if [[ $whichDSF == 'o' ]]; then
|
||||
correlator='psidag-psi'
|
||||
elif [[ $whichDSF == 'g' ]]; then
|
||||
correlator='psi-psidag'
|
||||
fi
|
||||
|
||||
mkdir -p logs
|
||||
logfile='logs/c_fixed_N_prog_'$whichDSF'_kBT_'$kBT'_sr_'$target_sumrule'_nkmax_'$nkmax'_nr_minutes_'$nr_minutes'_'$(date '+%Y-%m-%d-%Hh%M')'.log'
|
||||
touch $logfile
|
||||
|
||||
clist=(0.015625 0.03125 0.0625 0.125 0.25 0.5 1 2 4 8 16 32 64 128 256 512 1024)
|
||||
|
||||
basedir="$(pwd)"
|
||||
|
||||
for c in $clist
|
||||
do
|
||||
echo '** Starting run for c =' $c | tee -a $logfile
|
||||
dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_fixed_N_prog/c_'$c'/k_0_to_'${(l:2::0:)nkmax}'kFo4/sr_'$target_sumrule'/prelim'
|
||||
mkdir -p $dir
|
||||
cd $dir
|
||||
LiebLin_Catalogue_Fixed_c_Nscaling $whichDSF $c $nkmax $kBT $target_sumrule 0 $nr_minutes | tee -a $basedir/$logfile
|
||||
cd $basedir
|
||||
echo '++ Successfully completed run for c =' $c'.\n' | tee -a $logfile
|
||||
done
|
||||
|
||||
echo '\n\n++ Successfully completed c_fixed_N_prog_data on '$(date '+%Y-%m-%d-%Hh%M')'.\n' | tee -a $logfile
|
|
@ -1,74 +0,0 @@
|
|||
#! /bin/zsh
|
||||
|
||||
# We use zsh here to support floats (not supported in bash)
|
||||
|
||||
# This script produces the .dsfs files and figures for the `c_fixed_N_prog` runs
|
||||
# which achieved the required sumrule saturation.
|
||||
|
||||
if [[ $# -ne 5 ]]; then
|
||||
echo "Arguments needed: whichDSF, kBT, target_sumrule, nkmax (max momentum in units of kF/4), width."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $1 != 'd' && $1 != 'g' && $1 != 'o' ]]; then
|
||||
echo "Only the d, g and o scanning options are implemented."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $2 -lt 0 ]]; then
|
||||
echo "Temperature kBT must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $3 -lt 0 || $3 -gt 1 ]]; then
|
||||
echo "Requirement: 0 < target_sumrule < 1."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $4 -lt 0 ]]; then
|
||||
echo "nkmax must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $5 -lt 0 ]]; then
|
||||
echo "width must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
whichDSF=$1
|
||||
kBT=$2
|
||||
target_sumrule=$3
|
||||
nkmax=$4
|
||||
width=$5
|
||||
|
||||
correlator='rho-rho'
|
||||
if [[ $whichDSF == 'o' ]]; then
|
||||
correlator='psidag-psi'
|
||||
elif [[ $whichDSF == 'g' ]]; then
|
||||
correlator='psi-psidag'
|
||||
fi
|
||||
|
||||
clist=(0.015625 0.03125 0.0625 0.125 0.25 0.5 1 2 4 8 16 32 64 128 256 512 1024)
|
||||
|
||||
basedir="$(pwd)"
|
||||
|
||||
ommin=0
|
||||
ommax=$(($nkmax*($nkmax - 8))) # use lower branch of 1ph continuum
|
||||
Nom=1000
|
||||
|
||||
for c in $clist
|
||||
do
|
||||
echo 'Starting computation of DSFs for c =' $c
|
||||
dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_fixed_N_prog/c_'$c'/k_0_to_'${(l:2::0:)nkmax}'kFo4/sr_'$target_sumrule'/store/data'
|
||||
cd $dir
|
||||
for datadir in *
|
||||
do
|
||||
cd $datadir
|
||||
N=${datadir#"N_"}
|
||||
iKmax=$(($nkmax * $N/8))
|
||||
Smoothen_LiebLin_DSF_Scaled $whichDSF $c $N $N 0 $iKmax $kBT 0 $ommin $ommax $Nom $width
|
||||
cd ..
|
||||
done
|
||||
cd $basedir
|
||||
echo ' Successfully computed DSFs for c =' $c
|
||||
done
|
|
@ -1,95 +0,0 @@
|
|||
#! /bin/zsh
|
||||
|
||||
# We use zsh here to support floats (not supported in bash)
|
||||
|
||||
# This script produces the .dsfs files and figures for the `c_fixed_N_prog` runs
|
||||
# which achieved the required sumrule saturation.
|
||||
|
||||
if [[ $# -ne 5 ]]; then
|
||||
echo "Arguments needed: whichDSF, kBT, target_sumrule, nkmax (max momentum in units of kF/4), width."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $1 != 'd' && $1 != 'g' && $1 != 'o' ]]; then
|
||||
echo "Only the d, g and o scanning options are implemented."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $2 -lt 0 ]]; then
|
||||
echo "Temperature kBT must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $3 -lt 0 || $3 -gt 1 ]]; then
|
||||
echo "Requirement: 0 < target_sumrule < 1."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $4 -lt 0 ]]; then
|
||||
echo "nkmax must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $5 -lt 0 ]]; then
|
||||
echo "width must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
whichDSF=$1
|
||||
kBT=$2
|
||||
target_sumrule=$3
|
||||
nkmax=$4
|
||||
width=$5
|
||||
|
||||
correlator='rho-rho'
|
||||
if [[ $whichDSF == 'o' ]]; then
|
||||
correlator='psidag-psi'
|
||||
elif [[ $whichDSF == 'g' ]]; then
|
||||
correlator='psi-psidag'
|
||||
fi
|
||||
|
||||
clist=(0.015625 0.03125 0.0625 0.125 0.25 0.5 1 2 4 8 16 32 64 128 256 512 1024)
|
||||
|
||||
basedir="$(pwd)"
|
||||
|
||||
ommin=0
|
||||
ommax=$(($nkmax*($nkmax - 8))) # use lower branch of 1ph continuum
|
||||
Nom=1000
|
||||
|
||||
for c in $clist
|
||||
do
|
||||
echo 'Starting plotting of DSFs for c =' $c
|
||||
dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_fixed_N_prog/c_'$c'/k_0_to_'${(l:2::0:)nkmax}'kFo4/sr_'$target_sumrule'/store/data'
|
||||
cd $dir
|
||||
for datadir in *
|
||||
do
|
||||
cd $datadir
|
||||
N=${datadir#"N_"}
|
||||
mkdir -p ../../plots/N_$N
|
||||
cd ../../plots/N_$N
|
||||
# Move all K_, Omega_ and .dsfs files here
|
||||
mv ../../data/N_$N/K_* .
|
||||
mv ../../data/N_$N/Omega_* .
|
||||
mv ../../data/N_$N/*dsfs .
|
||||
|
||||
# Find the K and Omega file
|
||||
for file in *
|
||||
do
|
||||
if [[ $file = Omega* ]]; then
|
||||
omegafile=$file
|
||||
elif [[ $file = K_* ]]; then
|
||||
kfile=$file
|
||||
fi
|
||||
done
|
||||
# For each .dsfs file, plot
|
||||
for file in *_w_$width.dsfs
|
||||
do
|
||||
echo 'Found file ' $file
|
||||
# invoke the python script
|
||||
plot_dsf_k_range.py $kfile $omegafile $file
|
||||
done
|
||||
cd ../../data
|
||||
done
|
||||
cd $basedir
|
||||
echo ' Successfully computed DSFs for c =' $c
|
||||
done
|
|
@ -1,82 +0,0 @@
|
|||
#! /usr/bin/env python
|
||||
|
||||
"""
|
||||
Plot DSF.
|
||||
|
||||
Usage: c_scan_N_fixed_animation.py [N] [width]
|
||||
"""
|
||||
|
||||
import glob
|
||||
import matplotlib.pyplot as plt
|
||||
import matplotlib.animation as animation
|
||||
import numpy as np
|
||||
import os
|
||||
import sys
|
||||
|
||||
N = str(sys.argv[1])
|
||||
width = str(sys.argv[2])
|
||||
|
||||
|
||||
# Get the list of interactions which have been computed
|
||||
dirlist = os.listdir('../../data/N_%s' % N)
|
||||
clist = sorted([float(c.lstrip('c_')) for c in dirlist])
|
||||
|
||||
# Get the K file
|
||||
kfile = glob.glob('../../data/N_%s/c_%s*/K_*' % (N, str(clist[0]).rstrip('.0')[:12]))[0]
|
||||
k = np.loadtxt(kfile)
|
||||
|
||||
# Get the Omega file
|
||||
omegafile = glob.glob('../../data/N_%s/c_%s*/Omega*' % (N, str(clist[0]).rstrip('.0')[:12]))[0]
|
||||
omega = np.loadtxt(omegafile)
|
||||
|
||||
# Load all the available dsfs from the data store
|
||||
dsfs = {}
|
||||
for c in clist:
|
||||
# Do some black magic here: for matching the interaction,
|
||||
# first try for exact match, stripping '.0' to treat integer values, e.g. 4.0 into 4
|
||||
# and then (if it doesn't work) use only the first 12 characters, plus wildcard, to cover rounding errors
|
||||
try:
|
||||
dsffile = glob.glob('../../data/N_%s/c_%s/*_w_%s.dsfs' % (N, str(c).rstrip('.0'), width))[0]
|
||||
except IndexError:
|
||||
dsffile = glob.glob('../../data/N_%s/c_%s*/*_w_%s.dsfs' % (N, str(c).rstrip('.0')[:12], width))[0]
|
||||
dsfs[str(c)] = np.loadtxt(dsffile)
|
||||
|
||||
# Read some useful parameters from (last) file name:
|
||||
elements = dsffile.rpartition('/')[2].split('_')
|
||||
L = elements[5]
|
||||
#N = elements[7]
|
||||
iKmax = elements[14]
|
||||
width = elements[22].rpartition('.')[0]
|
||||
# which leads to
|
||||
rho = int(N)/int(L)
|
||||
|
||||
|
||||
fig, ax = plt.subplots()
|
||||
|
||||
# To determine the y axis limits, we look at the lowest value of c (sharpest peak)
|
||||
dsfsmax = 0.5
|
||||
|
||||
ymax = omega[-1]
|
||||
xtext = 0.05 * k[-1]
|
||||
ytext = 0.9 * ymax
|
||||
|
||||
ax.text(xtext, ytext, f'c = {clist[0]:10.6f}', color='white', fontsize='large')
|
||||
pcm = ax.pcolormesh(k, omega, dsfs[str(clist[0])], vmax=dsfsmax)
|
||||
fig.colorbar(pcm, ax=ax)
|
||||
def animate(i):
|
||||
ax.clear()
|
||||
ax.set_title(f'c scan, rho={rho} (N={N}), w={width}', fontsize='x-large')
|
||||
ax.text(xtext, ytext, f'c = {clist[i]:10.6f}', color='white', fontsize='x-large')
|
||||
ax.pcolormesh(k, omega, dsfs[str(clist[i])], vmax=dsfsmax)
|
||||
|
||||
ani = animation.FuncAnimation(fig, animate, frames=len(clist), interval=100, repeat=False)
|
||||
|
||||
outfilename = (dsffile.partition('_c_')[0].rpartition('/')[2] + '_c_scan_' +
|
||||
dsffile.partition('_c_')[2].partition('_')[2].partition('.dsfs')[0])
|
||||
|
||||
ani.save(outfilename + '.mp4')
|
||||
|
||||
with open(outfilename + '.html', 'w') as file:
|
||||
file.write(ani.to_html5_video())
|
||||
|
||||
#plt.show()
|
|
@ -1,105 +0,0 @@
|
|||
#! /bin/zsh
|
||||
|
||||
# For given N (L), this
|
||||
# computes the required DSF (up to required sumrule)
|
||||
# over a range of values of c_int.
|
||||
|
||||
# The data can then be used to produce animated graphs (with c_int evolving),
|
||||
# see the `c_scan_N_fixed_dsfs[_plot]` scripts.
|
||||
|
||||
if [[ $# -ne 5 ]]; then
|
||||
echo "Arguments needed: whichDSF, kBT, target_sumrule, N, nkmax (max momentum in units of kF/4)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $1 != 'd' && $1 != 'g' && $1 != 'o' ]]; then
|
||||
echo "Only the d, g and o scanning options are implemented."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $2 -lt 0 ]]; then
|
||||
echo "Temperature kBT must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $3 -lt 0 || $3 -gt 1 ]]; then
|
||||
echo "Requirement: 0 < target_sumrule < 1."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $4 -lt 0 ]]; then
|
||||
echo "N must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $5 -lt 0 ]]; then
|
||||
echo "nkmax must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
whichDSF=$1
|
||||
kBT=$2
|
||||
target_sumrule=$3
|
||||
N=$4
|
||||
nkmax=$5
|
||||
|
||||
correlator='rho-rho'
|
||||
if [[ $whichDSF == 'o' ]]; then
|
||||
correlator='psidag-psi'
|
||||
elif [[ $whichDSF == 'g' ]]; then
|
||||
correlator='psi-psidag'
|
||||
fi
|
||||
|
||||
mkdir -p logs
|
||||
logfile='logs/c_scan_N_fixed_'$whichDSF'_kBT_'$kBT'_sr_'$target_sumrule'_N_'$N'_nkmax_'$nkmax'_'$(date '+%Y-%m-%d-%Hh%M')'.log'
|
||||
touch $logfile
|
||||
|
||||
iKmax=$(($nkmax * $N/8))
|
||||
|
||||
Max_Secs=3600
|
||||
refine=0
|
||||
|
||||
# List of interactions: fractional powers of 2
|
||||
clist_raw=()
|
||||
for nc in {-160..160}
|
||||
do
|
||||
clist_raw=($clist_raw $(( 2**($nc/16.) )))
|
||||
done
|
||||
# Now cast the integer values to true integers
|
||||
zmodload zsh/mathfunc
|
||||
clist=()
|
||||
for c in $clist_raw
|
||||
do
|
||||
if [[ $((floor($c))) == $((ceil($c))) ]]; then
|
||||
clist=($clist $((int($c))))
|
||||
else
|
||||
clist=($clist $c)
|
||||
fi
|
||||
done
|
||||
|
||||
basedir="$(pwd)"
|
||||
|
||||
# Safety barrier:
|
||||
# if directory exists, don't do anything and request directory deletion before proceeding
|
||||
dircheck='Lieb-Liniger/'$correlator'/T_'$kBT'/c_scan_N_fixed/k_0_to_'${(l:2::0:)nkmax}'kFo4/sr_'$target_sumrule'/store/data/N_'$N
|
||||
echo $dircheck
|
||||
if [[ -d $dircheck ]]; then
|
||||
echo 'A c scan with these parameters already exists. Aborting.'
|
||||
echo 'If you really want to run this command, please first delete directory:\n'$dircheck
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
for c in $clist
|
||||
do
|
||||
echo '** Starting run for c =' $c', N = '$N | tee -a $logfile
|
||||
dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_scan_N_fixed/k_0_to_'${(l:2::0:)nkmax}'kFo4/sr_'$target_sumrule'/store/data/N_'$N'/c_'$c
|
||||
mkdir -p $dir
|
||||
cd $dir
|
||||
LiebLin_DSF $whichDSF $c $N $N 0 $iKmax $kBT $Max_Secs $target_sumrule $refine
|
||||
cd $basedir
|
||||
echo '++ Successfully computed DSFs for c =' $c', N = '$N'.\n' | tee -a $logfile
|
||||
done
|
||||
|
||||
echo '\n\n++ Successfully completed c_scan_N_fixed_data for N = '$N' on '$(date '+%Y-%m-%d-%Hh%M')'.\n' | tee -a $logfile
|
|
@ -1,96 +0,0 @@
|
|||
#! /bin/zsh
|
||||
|
||||
# For given N (L) this
|
||||
# computes the smoothened dsfs and produces the animated figure
|
||||
# for a `c_scan_N_fixed` run.
|
||||
|
||||
if [[ $# -ne 6 ]]; then
|
||||
echo "Arguments needed: whichDSF, kBT, target_sumrule, N, nkmax (max momentum in units of kF/4), width."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $1 != 'd' && $1 != 'g' && $1 != 'o' ]]; then
|
||||
echo "Only the d, g and o scanning options are implemented."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $2 -lt 0 ]]; then
|
||||
echo "Temperature kBT must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $3 -lt 0 || $3 -gt 1 ]]; then
|
||||
echo "Requirement: 0 < target_sumrule < 1."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $4 -lt 0 ]]; then
|
||||
echo "N must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $5 -lt 0 ]]; then
|
||||
echo "nkmax must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $6 -lt 0 ]]; then
|
||||
echo "width must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
whichDSF=$1
|
||||
kBT=$2
|
||||
target_sumrule=$3
|
||||
N=$4
|
||||
nkmax=$5
|
||||
width=$6
|
||||
|
||||
correlator='rho-rho'
|
||||
if [[ $whichDSF == 'o' ]]; then
|
||||
correlator='psidag-psi'
|
||||
elif [[ $whichDSF == 'g' ]]; then
|
||||
correlator='psi-psidag'
|
||||
fi
|
||||
|
||||
iKmax=$(($nkmax * $N/8))
|
||||
|
||||
ommin=0
|
||||
ommax=$(($nkmax*$nkmax)) # use mid-point between upper and lower branch of 1ph continuum
|
||||
Nom=1000
|
||||
|
||||
# store location for these runs
|
||||
dirstore='Lieb-Liniger/'$correlator'/T_'$kBT'/c_scan_N_fixed/k_0_to_'${(l:2::0:)nkmax}'kFo4/sr_'$target_sumrule'/store'
|
||||
|
||||
# List of interactions: fractional powers of 2
|
||||
clist_raw=()
|
||||
for nc in {-160..160}
|
||||
do
|
||||
clist_raw=($clist_raw $(( 2**($nc/16.) )))
|
||||
done
|
||||
# Now cast the integer values to true integers
|
||||
zmodload zsh/mathfunc
|
||||
clist=()
|
||||
for c in $clist_raw
|
||||
do
|
||||
if [[ $((floor($c))) == $((ceil($c))) ]]; then
|
||||
clist=($clist $((int($c))))
|
||||
else
|
||||
clist=($clist $c)
|
||||
fi
|
||||
done
|
||||
|
||||
basedir="$(pwd)"
|
||||
|
||||
for c in $clist
|
||||
do
|
||||
echo '** Starting computation of DSFs for c =' $c', N = '$N
|
||||
# First construct the dsfs
|
||||
|
||||
dir=$dirstore'/data/N_'$N'/c_'$c # dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_scan_N_fixed/k_0_to_'${(l:2::0:)nkmax}'kFo4/sr_'$target_sumrule'/store/data/N_'$N'/c_'$c
|
||||
cd $dir
|
||||
Smoothen_LiebLin_DSF_Scaled $whichDSF $c $N $N 0 $iKmax $kBT 0 $ommin $ommax $Nom $width
|
||||
cd $basedir
|
||||
echo ' Successfully computed DSFs for c =' $c', N = '$N'.\n'
|
||||
done
|
|
@ -1,75 +0,0 @@
|
|||
#! /bin/zsh
|
||||
|
||||
# For given N (L) this
|
||||
# computes the smoothened dsfs and produces the animated figure
|
||||
# for a `c_scan_N_fixed` run.
|
||||
|
||||
if [[ $# -ne 6 ]]; then
|
||||
echo "Arguments needed: whichDSF, kBT, target_sumrule, N, nkmax (max momentum in units of kF/4), width."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $1 != 'd' && $1 != 'g' && $1 != 'o' ]]; then
|
||||
echo "Only the d, g and o scanning options are implemented."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $2 -lt 0 ]]; then
|
||||
echo "Temperature kBT must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $3 -lt 0 || $3 -gt 1 ]]; then
|
||||
echo "Requirement: 0 < target_sumrule < 1."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $4 -lt 0 ]]; then
|
||||
echo "N must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $5 -lt 0 ]]; then
|
||||
echo "nkmax must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $6 -lt 0 ]]; then
|
||||
echo "width must be > 0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
whichDSF=$1
|
||||
kBT=$2
|
||||
target_sumrule=$3
|
||||
N=$4
|
||||
nkmax=$5
|
||||
width=$6
|
||||
|
||||
correlator='rho-rho'
|
||||
if [[ $whichDSF == 'o' ]]; then
|
||||
correlator='psidag-psi'
|
||||
elif [[ $whichDSF == 'g' ]]; then
|
||||
correlator='psi-psidag'
|
||||
fi
|
||||
|
||||
iKmax=$(($nkmax * $N/8))
|
||||
|
||||
ommin=0
|
||||
ommax=$(($nkmax*$nkmax)) # use mid-point between upper and lower branch of 1ph continuum
|
||||
Nom=1000
|
||||
|
||||
# store location for these runs
|
||||
dirstore='Lieb-Liniger/'$correlator'/T_'$kBT'/c_scan_N_fixed/k_0_to_'${(l:2::0:)nkmax}'kFo4/sr_'$target_sumrule'/store'
|
||||
|
||||
basedir="$(pwd)"
|
||||
|
||||
# Now create the animation
|
||||
echo '** Animating c_scan_N_fixed for N = '$N'...'
|
||||
dirplots=$dirstore'/plots/N_'$N
|
||||
mkdir -p $dirplots
|
||||
cd $dirplots
|
||||
c_scan_N_fixed_animation.py $N $width
|
||||
cd $basedir
|
||||
echo '** Successfully animated c_scan_N_fixed for N = '$N'.\n'
|
Loading…
Reference in New Issue