mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-11-09 06:53:38 +01:00
Compare commits
No commits in common. "a65e4d07a35c24f01ba30b2cdc1a274617ad502a" and "f14bd1bc6fdae6a2a654d7265b0f06e78e10cd06" have entirely different histories.
a65e4d07a3
...
f14bd1bc6f
1
configure
vendored
1
configure
vendored
@ -330,6 +330,7 @@ EOF
|
||||
|
||||
opam init --verbose --yes --compiler=4.07.1 --disable-sandboxing
|
||||
eval $(opam env)
|
||||
EOF
|
||||
execute << EOF
|
||||
opam install -y \${OCAML_PACKAGES} || exit 1
|
||||
EOF
|
||||
|
@ -47,7 +47,6 @@
|
||||
pages = {084103},
|
||||
author = {Anthony Fert{\'{e}} and Emmanuel Giner and Julien Toulouse},
|
||||
title = {Range-separated multideterminant density-functional theory with a short-range correlation functional of the on-top pair density},
|
||||
journal = {The Journal of Chemical Physics}
|
||||
}
|
||||
|
||||
@article{Caffarel_2019,
|
||||
|
@ -3,8 +3,7 @@ open Sexplib.Std
|
||||
|
||||
type t = int64 array [@@deriving sexp]
|
||||
|
||||
external to_int64_array : t -> int64 array = "%identity"
|
||||
external of_int64_array_no_check : int64 array -> t = "%identity"
|
||||
let to_int64_array (x:t) = (x:int64 array)
|
||||
|
||||
|
||||
let to_alpha_beta x =
|
||||
@ -62,6 +61,7 @@ let of_int64_array ~n_int ~alpha ~beta x =
|
||||
end;
|
||||
x
|
||||
|
||||
let of_int64_array_no_check x = x
|
||||
|
||||
let of_bitlist_couple ?n_int ~alpha ~beta (xa,xb) =
|
||||
let ba, bb =
|
||||
|
@ -196,9 +196,8 @@ end = struct
|
||||
|
||||
let write_psi_coef ~n_det ~n_states c =
|
||||
let n_det = Det_number.to_int n_det
|
||||
and c =
|
||||
Array.map Det_coef.to_float c
|
||||
|> Array.to_list
|
||||
and c = Array.to_list c
|
||||
|> List.map Det_coef.to_float
|
||||
and n_states =
|
||||
States_number.to_int n_states
|
||||
in
|
||||
@ -240,11 +239,12 @@ end = struct
|
||||
assert (n_int = dim.(0));
|
||||
assert (dim.(1) = 2);
|
||||
assert (dim.(2) = (Det_number.to_int (read_n_det ())));
|
||||
Array.init dim.(2) (fun i ->
|
||||
List.init dim.(2) (fun i ->
|
||||
Array.sub data (2*n_int*i) (2*n_int) )
|
||||
|> Array.map (Determinant.of_int64_array
|
||||
|> List.map (Determinant.of_int64_array
|
||||
~n_int:(N_int_number.of_int n_int)
|
||||
~alpha:n_alpha ~beta:n_beta )
|
||||
|> Array.of_list
|
||||
;;
|
||||
|
||||
let write_psi_det ~n_int ~n_det d =
|
||||
@ -363,7 +363,7 @@ Determinants ::
|
||||
"
|
||||
(b.expected_s2 |> Positive_float.to_string)
|
||||
(b.n_det |> Det_number.to_string)
|
||||
(b.state_average_weight |> Array.map Positive_float.to_string |> Array.to_list |> String.concat "\t")
|
||||
(b.state_average_weight |> Array.to_list |> List.map Positive_float.to_string |> String.concat "\t")
|
||||
det_text
|
||||
|> Rst_string.of_string
|
||||
;;
|
||||
@ -387,10 +387,10 @@ psi_det = %s
|
||||
(b.n_states |> States_number.to_string)
|
||||
(b.expected_s2 |> Positive_float.to_string)
|
||||
(b.state_average_weight |> Array.to_list |> List.map Positive_float.to_string |> String.concat ",")
|
||||
(b.psi_coef |> Array.map Det_coef.to_string |> Array.to_list
|
||||
(b.psi_coef |> Array.to_list |> List.map Det_coef.to_string
|
||||
|> String.concat ", ")
|
||||
(b.psi_det |> Array.map (Determinant.to_string ~mo_num) |> Array.to_list
|
||||
|> String.concat "\n\n")
|
||||
(b.psi_det |> Array.to_list |> List.map (Determinant.to_string
|
||||
~mo_num) |> String.concat "\n\n")
|
||||
;;
|
||||
|
||||
let of_rst r =
|
||||
|
Loading…
Reference in New Issue
Block a user