mirror of
https://gitlab.com/scemama/qp_plugins_scemama.git
synced 2025-01-08 20:33:11 +01:00
Dressing with HTC
This commit is contained in:
parent
44ef244fc0
commit
c77ac2598f
@ -4,3 +4,9 @@ doc: Dressing matrix obtained from DMC
|
|||||||
size: (determinants.n_det)
|
size: (determinants.n_det)
|
||||||
interface: ezfio, provider
|
interface: ezfio, provider
|
||||||
|
|
||||||
|
[dmc_delta_htc]
|
||||||
|
type: double precision
|
||||||
|
doc: Dressing matrix obtained from H_TC
|
||||||
|
size: (determinants.n_det)
|
||||||
|
interface: ezfio, provider
|
||||||
|
|
||||||
|
@ -12,21 +12,26 @@ sys.path.insert(0,QP_PATH)
|
|||||||
from ezfio import ezfio
|
from ezfio import ezfio
|
||||||
|
|
||||||
def read_hamiltonian(inp):
|
def read_hamiltonian(inp):
|
||||||
text = subprocess.run(["qmcchem", "result", inp], capture_output=True).stdout
|
# text = subprocess.run(["qmcchem", "result", inp], capture_output=True).stdout
|
||||||
|
text = subprocess.run(["cat", "OUT"], capture_output=True).stdout
|
||||||
inside = None
|
inside = None
|
||||||
h = []
|
h = []
|
||||||
s = []
|
s = []
|
||||||
norm = None
|
norm = None
|
||||||
for line in text.splitlines():
|
for line in text.splitlines():
|
||||||
line = str(line)
|
line = line.decode("utf-8")
|
||||||
print (line)
|
if line == "":
|
||||||
|
continue
|
||||||
if "Psi_norm :" in line:
|
if "Psi_norm :" in line:
|
||||||
norm = float(line.split()[3])
|
norm = float(line.split()[2])
|
||||||
if "]" in line:
|
if "]" in line:
|
||||||
inside = None
|
inside = None
|
||||||
if inside == "H":
|
if inside == "H":
|
||||||
data = line.split()
|
data = line.split()
|
||||||
h.append(float(data[3]))
|
# h.append(float(data[2])) #ave
|
||||||
|
h.append(max(float(data[2]) - float(data[4]),0.)) #diff
|
||||||
|
# if float(data[2]) - float(data[4])>0.: h.append(float(data[2]))
|
||||||
|
# else: h.append(0.)
|
||||||
elif "Ci_dress" in line:
|
elif "Ci_dress" in line:
|
||||||
inside = "H"
|
inside = "H"
|
||||||
h = np.array(h)/norm
|
h = np.array(h)/norm
|
||||||
@ -38,3 +43,4 @@ h = read_hamiltonian(sys.argv[1])
|
|||||||
ezfio.set_file(sys.argv[1])
|
ezfio.set_file(sys.argv[1])
|
||||||
ezfio.set_dmc_dress_dmc_delta_h(h)
|
ezfio.set_dmc_dress_dmc_delta_h(h)
|
||||||
print(h)
|
print(h)
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
double precision, allocatable :: delta(:)
|
double precision, allocatable :: delta(:)
|
||||||
|
|
||||||
allocate(delta(N_det))
|
allocate(delta(N_det))
|
||||||
delta(1:N_det) = dmc_delta_h(1:N_det)
|
delta (1:N_det) = dmc_delta_h(1:N_det) + dmc_delta_htc(1:N_det)
|
||||||
|
|
||||||
call dset_order(delta,psi_bilinear_matrix_order_reverse,N_det)
|
call dset_order(delta,psi_bilinear_matrix_order_reverse,N_det)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user