Skip to content

Commit

Permalink
Add sample for the dinamical green's function with Fourier trans.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuaki1987 committed Mar 30, 2019
1 parent e001f0a commit b0b9569
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 9 deletions.
19 changes: 19 additions & 0 deletions samples/Spectrum/Scratch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 14-site Heisenberg model on Chain lattice

Compute the Sz-Sz dynamical correlation function
and plot the imaginary part.

``` bash
$ HPhi -s stan.in
$ echo "2 6
G 0.0 0.0 0.0
X 0.0 0.5 0.0
" >> geometry.dat
$ dynamicalr2k namelist.def geometry.dat
$ gnuplot
```

``` gnuplot
gnuplot> load "kpath.gp"
gnuplot> splot [][][0:] "output/zvo_dyn.dat" u 1:2:(-$4) w l
```
11 changes: 11 additions & 0 deletions samples/Spectrum/Scratch/stan.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
model = Spin
lattice = Chain
method = CG
L = 12
2Sz = 0
J = 1.0
CalcSpec = Scratch
SpectrumType = SzSz_r
OmegaIm = 0.1
OmegaMin = -6.0
OmegaMax = -2.0
6 changes: 5 additions & 1 deletion test/fulldiag_genspin_ladder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ cat > reference.dat <<EOF
13.500000 0.000000 0.000000 42.000000 0.000000
EOF
paste output/zvo_phys_Nup2_Ndown2.dat reference.dat > paste.dat
diff=`awk 'BEGIN{diff=0.0} NR>1{diff+=sqrt(($1-$6)*($1-$6))} END{printf "%8.6f", diff}' paste.dat`
diff=`awk '
BEGIN{diff=0.0}
NR>1{diff+=sqrt(($1-$6)*($1-$6))}
END{printf "%8.6f", diff/NR}
' paste.dat`
test "${diff}" = "0.000000"

exit $?
6 changes: 5 additions & 1 deletion test/fulldiag_genspingc_ladder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ cat > reference.dat <<EOF
10.750000 2.000000 2.000000 12.000000 0.000000
EOF
paste output/zvo_phys.dat reference.dat > paste.dat
diff=`awk 'BEGIN{diff=0.0} NR>1{diff+=sqrt(($1-$6)*($1-$6))} END{printf "%8.6f", diff}' paste.dat`
diff=`awk '
BEGIN{diff=0.0}
NR>1{diff+=sqrt(($1-$6)*($1-$6))}
END{printf "%8.6f", diff/NR}
' paste.dat`
test "${diff}" = "0.000000"

exit $?
6 changes: 5 additions & 1 deletion test/fulldiag_hubbard_chain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ cat > reference.dat <<EOF
10.102748 4.000000 0.000000 -0.000000 1.712675
EOF
paste output/zvo_phys_Nup2_Ndown2.dat reference.dat > paste.dat
diff=`awk 'BEGIN{diff=0.0} NR>1{diff+=sqrt(($1-$6)*($1-$6))} END{printf "%8.6f", diff}' paste.dat`
diff=`awk '
BEGIN{diff=0.0}
NR>1{diff+=sqrt(($1-$6)*($1-$6))}
END{printf "%8.6f", diff/NR}
' paste.dat`
test "${diff}" = "0.000000"

exit $?
6 changes: 5 additions & 1 deletion test/fulldiag_hubbardgc_tri.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ cat > reference.dat <<EOF
17.544004 4.000000 0.000000 0.000000 1.441479
EOF
paste output/zvo_phys.dat reference.dat > paste.dat
diff=`awk 'BEGIN{diff=0.0} NR>1{diff+=sqrt(($1-$6)*($1-$6))} END{printf "%8.6f", diff}' paste.dat`
diff=`awk '
BEGIN{diff=0.0}
NR>1{diff+=sqrt(($1-$6)*($1-$6))}
END{printf "%8.6f", diff/NR}
' paste.dat`
test "${diff}" = "0.000000"

exit $?
7 changes: 6 additions & 1 deletion test/fulldiag_kondo_chain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ cat > reference.dat <<EOF
4.772002 6.000000 -0.000000 -0.000000 0.354557
EOF
paste output/zvo_phys_Nup3_Ndown3.dat reference.dat > paste.dat
diff=`awk 'BEGIN{diff=0.0} NR>1{diff+=sqrt(($1-$6)*($1-$6))} END{printf "%8.6f", diff}' paste.dat`
diff=`awk '
BEGIN{diff=0.0}
NR>1{diff+=sqrt(($1-$6)*($1-$6))}
END{printf "%8.6f", diff/NR}
' paste.dat`
echo "Diff : " $diff
test "${diff}" = "0.000000"

exit $?
6 changes: 5 additions & 1 deletion test/fulldiag_kondogc_chain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ cat > reference.dat <<EOF
4.744563 4.000000 0.000000 0.876035 0.380558
EOF
paste output/zvo_phys.dat reference.dat > paste.dat
diff=`awk 'BEGIN{diff=0.0} NR>1{diff+=sqrt(($1-$6)*($1-$6))} END{printf "%8.6f", diff}' paste.dat`
diff=`awk '
BEGIN{diff=0.0}
NR>1{diff+=sqrt(($1-$6)*($1-$6))}
END{printf "%8.6f", diff/NR}
' paste.dat`
test "${diff}" = "0.000000"

exit $?
6 changes: 5 additions & 1 deletion test/fulldiag_spin_tri.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ cat > reference.dat <<EOF
4.500000 0.000000 0.000000 12.000000 0.000000
EOF
paste output/zvo_phys_Nup3_Ndown3.dat reference.dat > paste.dat
diff=`awk 'BEGIN{diff=0.0} NR>1{diff+=sqrt(($1-$6)*($1-$6))} END{printf "%8.6f", diff}' paste.dat`
diff=`awk '
BEGIN{diff=0.0}
NR>1{diff+=sqrt(($1-$6)*($1-$6))}
END{printf "%8.6f", diff/NR}
' paste.dat`
test "${diff}" = "0.000000"

exit $?
6 changes: 5 additions & 1 deletion test/fulldiag_spingc_tri.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ cat > reference.dat <<EOF
4.500000 6.000000 3.000000 12.000000 0.000000
EOF
paste output/zvo_phys.dat reference.dat > paste.dat
diff=`awk 'BEGIN{diff=0.0} NR>1{diff+=sqrt(($1-$6)*($1-$6))} END{printf "%8.6f", diff}' paste.dat`
diff=`awk '
BEGIN{diff=0.0}
NR>1{diff+=sqrt(($1-$6)*($1-$6))}
END{printf "%8.6f", diff/NR}
' paste.dat`
test "${diff}" = "0.000000"

exit $?
5 changes: 4 additions & 1 deletion tool/dynamicalr2k.F90
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,10 @@ SUBROUTINE output_cor()
WRITE(fo,'(a,a,a,f10.5,a)',advance="no") "'", TRIM(kname(inode)), "' ", xk_label(inode), ", "
END DO
WRITE(fo,'(a,a,a,f10.5,a)') "'", TRIM(kname(nnode)), "' ", xk_label(nnode), ")"
WRITE(fo,'(a)') "set ylabel 'Frequency'"
WRITE(fo,'(a)') "set ylabel 'Energy from E_0'"
WRITE(fo,'(a)') "set zlabel 'Spectrum' rotate"
WRITE(fo,'(a)') "set ticslevel 0"
WRITE(fo,'(a)') "set xzeroaxis"
WRITE(fo,'(a)') "set grid xtics lt 1 lc 0"
!
CLOSE(fo)
Expand Down

0 comments on commit b0b9569

Please sign in to comment.