mirror of
https://gitlab.com/scemama/qmcchem.git
synced 2024-12-21 11:53:30 +01:00
Merge branch 'master' of gitlab.com:scemama/qmcchem
This commit is contained in:
commit
4cbb4f6a2d
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
#!/usr/bin/env python3 -u
|
||||
|
||||
import scipy as sp
|
||||
import scipy.optimize
|
||||
@ -17,7 +17,7 @@ from ezfio import ezfio
|
||||
|
||||
# PARAMETERS
|
||||
thresh = 1.e-2
|
||||
block_time = 20
|
||||
block_time = 6
|
||||
|
||||
def main():
|
||||
if len(sys.argv) != 2:
|
||||
@ -45,6 +45,9 @@ def main():
|
||||
atom_map = make_atom_map()
|
||||
|
||||
|
||||
def get_params_b():
|
||||
return ezfio.jastrow_jast_b_up_dn
|
||||
|
||||
def get_params_pen():
|
||||
d = ezfio.jastrow_jast_pen
|
||||
print(atom_map)
|
||||
@ -76,6 +79,11 @@ def main():
|
||||
return None, None
|
||||
|
||||
|
||||
def set_params_b(x):
|
||||
x = np.abs(x)
|
||||
ezfio.set_jastrow_jast_b_up_up(x)
|
||||
ezfio.set_jastrow_jast_b_up_dn(x)
|
||||
|
||||
def set_params_pen(x):
|
||||
x = np.abs(x)
|
||||
y=list(ezfio.jastrow_jast_pen)
|
||||
@ -113,7 +121,8 @@ def main():
|
||||
h = str(x)
|
||||
if h in memo_energy:
|
||||
return memo_energy[h]
|
||||
set_params_pen(x)
|
||||
set_params_b(x[0])
|
||||
set_params_pen(x[1:])
|
||||
set_vmc_params()
|
||||
pid = os.fork()
|
||||
if pid == 0:
|
||||
@ -154,14 +163,15 @@ def main():
|
||||
|
||||
|
||||
def run():
|
||||
x = get_params_pen()
|
||||
x = np.array([ get_params_b() ] + list(get_params_pen()))
|
||||
if sum(x) == 0.:
|
||||
jast_a_up_dn = ezfio.jastrow_jast_a_up_dn
|
||||
x += jast_a_up_dn
|
||||
opt = sp.optimize.minimize(f,x,method="Powell",
|
||||
options= {'disp':True, 'ftol':thresh,'xtol':0.02})
|
||||
print("x = "+str(opt))
|
||||
set_params_pen(opt['x'])
|
||||
set_params_b(opt['x'][0])
|
||||
set_params_pen(opt['x'][1:])
|
||||
|
||||
run()
|
||||
|
||||
|
@ -1588,7 +1588,7 @@ END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, det_beta_value, (det_beta_num_8) ]
|
||||
&BEGIN_PROVIDER [ double precision, det_beta_grad_lapl, (4,elec_beta_num,det_beta_num) ]
|
||||
&BEGIN_PROVIDER [ double precision, det_beta_pseudo, (det_beta_num_8,det_beta_num_pseudo) ]
|
||||
&BEGIN_PROVIDER [ double precision, det_beta_pseudo, (elec_beta_num_8,det_beta_num_pseudo) ]
|
||||
|
||||
|
||||
implicit none
|
||||
|
Loading…
Reference in New Issue
Block a user