mirror of
https://gitlab.com/scemama/qmcchem.git
synced 2024-12-22 04:13:31 +01:00
Added Weight
This commit is contained in:
parent
25ef42fa55
commit
9cd20a46e7
@ -183,10 +183,10 @@ def main():
|
|||||||
if sum(x) == 0.:
|
if sum(x) == 0.:
|
||||||
jast_a_up_dn = ezfio.jastrow_jast_a_up_dn
|
jast_a_up_dn = ezfio.jastrow_jast_a_up_dn
|
||||||
x += jast_a_up_dn
|
x += jast_a_up_dn
|
||||||
# opt = sp.optimize.minimize(f,x,method="Powell",
|
opt = sp.optimize.minimize(f,x,method="Powell",
|
||||||
# options= {'disp':True, 'ftol':thresh,'xtol':0.02})
|
|
||||||
opt = sp.optimize.minimize(f,x,method="Nelder-Mead",
|
|
||||||
options= {'disp':True, 'ftol':thresh,'xtol':0.02})
|
options= {'disp':True, 'ftol':thresh,'xtol':0.02})
|
||||||
|
# opt = sp.optimize.minimize(f,x,method="Nelder-Mead",
|
||||||
|
# options= {'disp':True, 'ftol':thresh,'xtol':0.02})
|
||||||
print("x = "+str(opt))
|
print("x = "+str(opt))
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
set_params_b(opt['x'][0])
|
set_params_b(opt['x'][0])
|
||||||
|
@ -131,7 +131,7 @@ let display_histogram ~range property =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
(** Display a summary of all the cmoputed quantities *)
|
(** Display a summary of all the computed quantities *)
|
||||||
let display_summary ~range =
|
let display_summary ~range =
|
||||||
|
|
||||||
let properties =
|
let properties =
|
||||||
@ -152,12 +152,16 @@ let display_summary ~range =
|
|||||||
Random_variable.of_raw_data ~range Property.Wall
|
Random_variable.of_raw_data ~range Property.Wall
|
||||||
|> Random_variable.max_value_per_compute_node
|
|> Random_variable.max_value_per_compute_node
|
||||||
|> Random_variable.sum
|
|> Random_variable.sum
|
||||||
|
and total_weight =
|
||||||
|
Random_variable.of_raw_data ~range Property.E_loc
|
||||||
|
|> Random_variable.total_weight
|
||||||
in
|
in
|
||||||
|
|
||||||
let speedup =
|
let speedup =
|
||||||
cpu /. wall
|
cpu /. wall
|
||||||
in
|
in
|
||||||
Printf.printf "%20s : %10.2f x\n" "Speedup" speedup
|
Printf.printf "%20s : %10.2f x\n" "Speedup" speedup ;
|
||||||
|
Printf.printf "%20s : %20.10e\n" "Total weight" total_weight
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -189,6 +189,13 @@ let sum { property ; data } =
|
|||||||
in accu +. num
|
in accu +. num
|
||||||
) 0. data
|
) 0. data
|
||||||
|
|
||||||
|
(** Compute sum of the weights *)
|
||||||
|
let total_weight { property ; data } =
|
||||||
|
List.fold_left (fun accu x ->
|
||||||
|
let num = (Weight.to_float x.Block.weight)
|
||||||
|
in accu +. num
|
||||||
|
) 0. data
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(** Calculation of the average and error bar *)
|
(** Calculation of the average and error bar *)
|
||||||
|
Loading…
Reference in New Issue
Block a user