-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Defined better PATH initialization for the code.
- Loading branch information
Showing
10 changed files
with
148 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/python | ||
|
||
L = 400 | ||
t = 1.0 | ||
n_imp = 4 | ||
approx = "iBALDA" | ||
description = "_singleshot" | ||
for U in [4.0,8.0]: | ||
output = "L{}_U{}_t{}_nimp{}_{}{}_MIT_results.out".format(str(L),str(U),str(t),str(n_imp),approx,description) | ||
with open("OUTPUT/"+output,"w") as f: | ||
f.write("%15s %15s\n" % ("n_elec","chem_pot")) | ||
for i in range(-100*int(U)-1,100*int(U)+1,1): | ||
mu = i/100.0 | ||
energy_min = 1000 | ||
for N in range(2*n_imp,402,2): | ||
name = "L{}_N{}_U{}_t{}_nimp{}_{}{}.out".format(str(L),str(N),str(U),str(t),str(n_imp),approx,description) | ||
with open("OUTPUT/"+name,"r") as f: | ||
for i, lines in enumerate(f): | ||
if i == 3: | ||
energy = float(lines.split()[4+n_imp-1]) | ||
energy_mu_n = energy - mu*N/L | ||
if energy_mu_n < energy_min: | ||
energy_min = energy_mu_n | ||
Nmin = N | ||
with open("OUTPUT/"+output,"a") as f: | ||
f.write("%15d %15.6f\n" % (Nmin, mu)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import subprocess | ||
|
||
L=400 | ||
t=1.0 | ||
description="_singleshot" | ||
Ulist = [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.2,1.4,1.6,1.8,2.0,2.5,3.0,3.5,4.0,4.5,5.0,6.0,7.0,8.0,9.0,10.0,12.0,14.0,16.0,18.0,20.0,30.0,40.0,50.0,60.0,70.0,80.0,90.0,100.0,150.0,200.0,1000.0,10000.0] | ||
|
||
for approx in ["iBALDA"]: | ||
for U in Ulist: | ||
for n_imp in [1,4]: | ||
for N in [400]: | ||
name1 = "OUTPUT/L{}_N{}_U{}_t{}_nimp{}_{}.out".format(str(L),str(N),str(U),str(t),str(n_imp),approx) | ||
name2 = "OUTPUT/L{}_N{}_U{}_t{}_nimp{}_{}{}.out".format(str(L),str(N),str(U),str(t),str(n_imp),approx,description) | ||
subprocess.call("mv -f " + name1 + " " + name2,shell=True) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/python | ||
import os | ||
|
||
L = 400 | ||
t = 1.0 | ||
n_imp = 1 | ||
approx = "2LBALDA" | ||
description ="_singleshot" | ||
Ulist = [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.2,1.4,1.6,1.8,2.0,2.5,3.0,3.5,4.0,4.5,5.0,6.0,7.0,8.0,9.0,10.0,12.0,14.0,16.0,18.0,20.0,30.0,40.0,50.0,60.0,70.0,80.0,90.0,100.0,150.0,200.0,1000.0,10000.0] | ||
chem_pot = False | ||
for N in [400]: | ||
output = "L{}_N{}_t{}_nimp{}_{}{}_fctU_results.out".format(str(L),str(N),str(t),str(n_imp),approx,description) | ||
with open("OUTPUT/"+output,"w") as f: | ||
if chem_pot is True: | ||
f.write("%15s %15s %15s %15s %15s %15s %15s\n" % ("U/t","SS_energy","SS_dblocc","energy","dblocc","mu","deltav")) | ||
else: | ||
f.write("%15s %15s %15s %15s %15s\n" % ("U/t","SS_energy","SS_dblocc","energy","dblocc")) | ||
for U in Ulist: | ||
name = "L{}_N{}_U{}_t{}_nimp{}_{}{}.out".format(str(L),str(N),str(U),str(t),str(n_imp),approx,description) | ||
if os.stat("OUTPUT/"+name).st_size == 0: | ||
raise ValueError("File " + name + " is empty.") | ||
with open("OUTPUT/"+name,"r") as f: | ||
for i, lines in enumerate(f): | ||
if i == 3: | ||
single_shot = lines.split() | ||
else: | ||
pass | ||
conv = os.popen("tail -n 1 %s" % "OUTPUT/"+name).read().split() | ||
with open("OUTPUT/"+output,"a") as f: | ||
if chem_pot is True: | ||
f.write("%15f %15.8f %15.8f %15.8f %15.8f %15.8f %15.8f\n" % (U,float(single_shot[4+n_imp-1]),float(single_shot[6+n_imp-1]),float(conv[3+n_imp-1]),float(conv[5+n_imp-1]),float(single_shot[7+n_imp-1]),float(single_shot[8+n_imp-1]))) | ||
else: | ||
f.write("%15f %15.8f %15.8f %15.8f %15.8f\n" % (U,float(single_shot[4+n_imp-1]),float(single_shot[6+n_imp-1]),float(conv[3+n_imp-1]),float(conv[5+n_imp-1]))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/python | ||
import os | ||
|
||
L = 400 | ||
t = 1.0 | ||
n_imp = 4 | ||
approx = "iBALDA" | ||
description ="_singleshot" | ||
chem_pot = False | ||
for U in [4.0,8.0]: | ||
output = "L{}_U{}_t{}_nimp{}_{}{}_fctn_results.out".format(str(L),str(U),str(t),str(n_imp),approx,description) | ||
with open("OUTPUT/"+output,"w") as f: | ||
if chem_pot is True: | ||
f.write("%15s %15s %15s %15s %15s %15s %15s\n" % ("N_elec","SS_energy","SS_dblocc","energy","dblocc","mu","deltav")) | ||
else: | ||
f.write("%15s %15s %15s %15s %15s\n" % ("N_elec","SS_energy","SS_dblocc","energy","dblocc")) | ||
for N in range(2*n_imp,402,2): | ||
name = "L{}_N{}_U{}_t{}_nimp{}_{}{}.out".format(str(L),str(N),str(U),str(t),str(n_imp),approx,description) | ||
if os.stat("OUTPUT/"+name).st_size == 0: | ||
raise ValueError("File " + name + " is empty.") | ||
with open("OUTPUT/"+name,"r") as f: | ||
for i, lines in enumerate(f): | ||
if i == 3: | ||
single_shot = lines.split() | ||
else: | ||
pass | ||
conv = os.popen("tail -n 1 %s" % "OUTPUT/"+name).read().split() | ||
with open("OUTPUT/"+output,"a") as f: | ||
if chem_pot is True: | ||
f.write("%15d %15.8f %15.8f %15.8f %15.8f %15.8f %15.8f\n" % (N,float(single_shot[4+n_imp-1]),float(single_shot[6+n_imp-1]),float(conv[3+n_imp-1]),float(conv[5+n_imp-1]),float(single_shot[7+n_imp-1]),float(single_shot[8+n_imp-1]))) | ||
else: | ||
f.write("%15d %15.8f %15.8f %15.8f %15.8f\n" % (N,float(single_shot[4+n_imp-1]),float(single_shot[6+n_imp-1]),float(conv[3+n_imp-1]),float(conv[5+n_imp-1]))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters