Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spinless hamiltonian (zero hopping) #46

Closed
rp092 opened this issue Aug 12, 2018 · 11 comments
Closed

spinless hamiltonian (zero hopping) #46

rp092 opened this issue Aug 12, 2018 · 11 comments

Comments

@rp092
Copy link

rp092 commented Aug 12, 2018

Good evening, this one is the spinless hamiltonian I would like to run on HPhi

H = Δ Σ_ j (-1)^j n_j + V Σ_ j n_ j n_ j+1

with Δ = 1 and V = 1. Here is a sketch of the excitations of the system.
eccitazioni

In the case L=6 nelec = 3 I'm expecting two kinds of excitations:
the first one with energy E = 2Δ + 2V, the second one with energy E= 2Δ + V.
So in the spectrum there would be two peaks, the first at E = 4 and the second E = 3 with double spectral weight respect to the first. I insert the staggered potential trought the trans.def file like this:

`

NTransfer 48

========i_j_s_tijs======

1     0     0     0         0.000000000000000         0.000000000000000
0     0     1     0         0.000000000000000        -0.000000000000000
1     1     0     1         0.000000000000000         0.000000000000000
0     1     1     1         0.000000000000000        -0.000000000000000
2     0     1     0         0.000000000000000         0.000000000000000
1     0     2     0         0.000000000000000        -0.000000000000000
2     1     1     1         0.000000000000000         0.000000000000000
1     1     2     1         0.000000000000000        -0.000000000000000
3     0     2     0         0.000000000000000         0.000000000000000
2     0     3     0         0.000000000000000        -0.000000000000000
3     1     2     1         0.000000000000000         0.000000000000000
2     1     3     1         0.000000000000000        -0.000000000000000
4     0     3     0         0.000000000000000         0.000000000000000
3     0     4     0         0.000000000000000        -0.000000000000000
4     1     3     1         0.000000000000000         0.000000000000000
3     1     4     1         0.000000000000000        -0.000000000000000
5     0     4     0         0.000000000000000         0.000000000000000
4     0     5     0         0.000000000000000        -0.000000000000000
5     1     4     1         0.000000000000000         0.000000000000000
4     1     5     1         0.000000000000000        -0.000000000000000
0     0     5     0         0.000000000000000         0.000000000000000
5     0     0     0         0.000000000000000        -0.000000000000000
0     1     5     1         0.000000000000000         0.000000000000000
5     1     0     1         0.000000000000000        -0.000000000000000
0     0     0     0         1.000000000000000         0.000000000000000
0     1     0     0         1.000000000000000         0.000000000000000
0     0     0     1         1.000000000000000         0.000000000000000
0     1     0     1         1.000000000000000         0.000000000000000
1     0     1     0        -1.000000000000000         0.000000000000000
1     1     1     0        -1.000000000000000         0.000000000000000
1     0     1     1        -1.000000000000000         0.000000000000000
1     1     1     1        -1.000000000000000         0.000000000000000
2     0     2     0         1.000000000000000         0.000000000000000
2     1     2     0         1.000000000000000         0.000000000000000
2     0     2     1         1.000000000000000         0.000000000000000
2     1     2     1         1.000000000000000         0.000000000000000
3     0     3     0        -1.000000000000000         0.000000000000000
3     1     3     0        -1.000000000000000         0.000000000000000
3     0     3     1        -1.000000000000000         0.000000000000000
3     1     3     1        -1.000000000000000         0.000000000000000
4     0     4     0         1.000000000000000         0.000000000000000
4     1     4     0         1.000000000000000         0.000000000000000
4     0     4     1         1.000000000000000         0.000000000000000
4     1     4     1         1.000000000000000         0.000000000000000
5     0     5     0        -1.000000000000000         0.000000000000000
5     1     5     0        -1.000000000000000         0.000000000000000
5     0     5     1        -1.000000000000000         0.000000000000000
5     1     5     1        -1.000000000000000         0.000000000000000`

and I calculate the density-density dynamical GF using that BASH code:

#!/bin/bash
export LC_NUMERIC="en_US.UTF-8"

Q_start=0
Q_end=0.5
Dq=0.01

mkdir GF
for q in seq $Q_start $Dq $Q_end
do
cat scenario_gf.in | sed 's/SpectrumQL = .*/SpectrumQL = '$q'/g' > scenario_$q.in
echo "Running scenario $q..."
HPhi -sdry scenario_$q.in > tmp
rm trans.def
cp Delta1/trans.def trans.def

HPhi -e namelist.def
cp output/zvo_DynamicalGreen.dat GF/dyn_gf_$q.dat
done

given that the output of the calculation is that spectrum

t 0_v 1_delta 1

(it is in logartimic scale + an ε to avoid any divergence)

If you look at q=π (0.5 in fractional coordinates) and q=0 there are no excitations apart from the "elastic" terms of the GF at ω = 0. Are there any errors among my inputs or am I misunderstanding something in the calculation of the GF with HPhi?

Thanks a lot.
R.

@mitsuaki1987
Copy link
Member

Dear rp092

Would you please provide us the scenario_gf.in ?

Best regards,
Mitsuaki Kawamura
ISSP, University of Tokyo

@mitsuaki1987
Copy link
Member

Also,
How about the single-particle dynamical GF ?

@rp092
Copy link
Author

rp092 commented Sep 4, 2018

Sure. I' write down here the new bash code that I'm using. If you put Q_start = Q_end and Delta_start = Delta_end the code runs only one time at fixed Q and Delta. In my formalism I use Q as the wave vector of the excitation. Next I'm using a python script to plot the GF.

#################################################################################
BASH code
#################################################################################

#!/bin/bash
export LC_NUMERIC="en_US.UTF-8"

if [ $# -ne 7 ]
then
echo "Pass me the scenario.in as first argument."
echo "Pass me Delta_start as second argument."
echo "Pass me Delta_end as third argument."
echo "Pass me Delta_Delta as fourth argument."
echo "Pass me Q_star as fifth argument."
echo "Pass me Q_end as sixth argument."
echo "Pass me Dq as seventh argument."
exit
fi

input=$1
input_gf=$input.gf

Delta_Start=$2
Delta_End=$3
Delta_Delta=$4

Q_start=$5
Q_end=$6
Dq=$7

cat $input | grep -v Eigenvec > $input_gf
cat >> $input_gf <<EOF
CalcSpec = "Normal"
SpectrumType = "Density"

SpectrumQW = 0
SpectrumQL = XXX

OmegaIM = -0.1
NOmega = 5000
EOF

L=cat $input | grep "L" | awk -F "=" '{name=$1; value=$2; gsub(" ", "", name); gsub(" ", "", value); if (name == "L") print value}'

mkdir -p Results
cp $input Results

cp $input_gf Results
cd Results

for delta in seq $Delta_Start $Delta_Delta $Delta_End
do
rm -f trans.def
HPhi -sdry $input > output_$delta
cat > generate_trans.py <<EOF

for i in range($L):
sign = (-1)*i/2.
for s1 in range(2):
for s2 in range(2):
line = "%5d %5d %5d %5d%26.15f%26.15f" % (i, s1, i, s2, sign$delta, 0)
print line
EOF
python generate_trans.py >> trans.def
cat trans.def | sed 's/NTransfer./NTransfer '$(($L8))'/g' > trans_new
mv trans_new trans.def

cp trans.def trans.def.bak

HPhi -e namelist.def > output_e_$delta

for q in seq $Q_start $Dq $Q_end
do
cat $input_gf | sed 's/XXX/'$q'/g' > scenario_$q.in

echo "Running scenario $delta | $q..."
HPhi -sdry scenario_$q.in > tmp
cp trans.def.bak trans.def

HPhi -e namelist.def > GF_calc_output_$delta_$q
outfile=printf "dyn_delta_%.1f_Q_%.2f.dat" $delta $q
cp output/zvo_DynamicalGreen.dat $outfile

energy=cat output/zvo_energy.dat | grep Energy | awk '{print $2}'

cat > shift_gf.py <<EOF

from numpy import *
GF = loadtxt("dyn_delta_${delta}Q$q.dat")
w = GF[:,0]
GF_Im = GF[:,3]

new_data = zeros( ( len(w), 2))
new_data[:,0] = w - $energy
new_data[:,1] = GF_Im

savetxt("green_function_D${delta}_Q$q.dat", new_data)
EOF
python shift_gf.py
done
done

#################################################################################
python code
#################################################################################
from numpy import *
from matplotlib.pyplot import *
import sys

if len(sys.argv) != 5:
print "Pass me the GS energy (first row in zvo_energy.dat) as first argument."
print "Pass me Delta (staggered potential) as second argument."
print "Pass me Q_start as third argument."
print "Pass me Q_end as fourth argument."
exit()

d_ENERGY = float(sys.argv[1])
Delta = float(sys.argv[2])
Q_start = float(sys.argv[3])
Q_end = float(sys.argv[4])

NQ = 101
q = linspace(Q_start, Q_end, NQ)

datas = []
for q_val in q:
data = loadtxt("Results/dyn_delta_%.1f_Q_%.2f.dat" % (Delta,q_val))
datas.append(data)

w = datas[0][:,0]
GF_im = zeros((len(w), NQ))

for i, data in enumerate(datas):
GF_im[:, i] = data[:,3]

savetxt("GF_im.dat", GF_im)
GF_im[abs(GF_im) > 40] = 40
w = w - d_ENERGY
imshow(abs(GF_im), aspect="auto", origin= "lower", extent = [ Q_start, Q_end, min(w), max(w)])
ylabel(r"$\omega$")
xlabel("q")
title("Imaginary part of the Dynamical Green function")
colorbar()

show()

@mitsuaki1987
Copy link
Member

Dear rp092

Thank you.
Where can I see your input file for HPhi.

Also, did you try SpectrumType = "up" (or "down") ?

Best regards,
Mitsuaki Kawamura

@rp092
Copy link
Author

rp092 commented Sep 5, 2018

Here is my input file scenario.in:

L = 6
model = "Fermion Hubbard"
method = "Lanczos"
lattice = "Chain Lattice"

U = 0
mu = 0
t = 0
V = 1.0
nelec = 3
2Sz = 3

EigenvecIO = "out"

I didn't try any other spectrum type beyond the density one.

@mitsuaki1987
Copy link
Member

Why do you focus on the density-density correlation function ?
I think all eigenstates of this system are also eigenstates of every number operator.

@rp092
Copy link
Author

rp092 commented Sep 5, 2018

Because I would like to study the electron-hole pair excitations spectrum on varying the hopping term t and the Coulomb repulsion V>0.

@mitsuaki1987
Copy link
Member

mitsuaki1987 commented Sep 5, 2018

Is it correct ?
default

@rp092
Copy link
Author

rp092 commented Sep 6, 2018

What do you mean by n_{R0}?
So what you're saying to me is that I'm looking to the wrong GF?

@mitsuaki1987
Copy link
Member

Sorry, I wrote too indirectly, and I modified the above formula.
What I wanted to say is

  • Your dynamical correlation function can be derived analytically.
  • The numerical result with HPhi agrees this analytical result.
  • You are misunderstanding; there is no excitation in the density-density correlation function.
  • If you compute the one-body correlation function, you can see peaks at E = 2Δ + 2V, 2Δ + V, and so on.

@rp092
Copy link
Author

rp092 commented Sep 6, 2018

Thanks a lot.

R.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants