9
1
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.

4 changed files with 12 additions and 12 deletions

1
configure vendored
View File

@ -330,6 +330,7 @@ EOF
opam init --verbose --yes --compiler=4.07.1 --disable-sandboxing opam init --verbose --yes --compiler=4.07.1 --disable-sandboxing
eval $(opam env) eval $(opam env)
EOF
execute << EOF execute << EOF
opam install -y \${OCAML_PACKAGES} || exit 1 opam install -y \${OCAML_PACKAGES} || exit 1
EOF EOF

View File

@ -47,7 +47,6 @@
pages = {084103}, pages = {084103},
author = {Anthony Fert{\'{e}} and Emmanuel Giner and Julien Toulouse}, 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}, 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, @article{Caffarel_2019,

View File

@ -3,8 +3,7 @@ open Sexplib.Std
type t = int64 array [@@deriving sexp] type t = int64 array [@@deriving sexp]
external to_int64_array : t -> int64 array = "%identity" let to_int64_array (x:t) = (x:int64 array)
external of_int64_array_no_check : int64 array -> t = "%identity"
let to_alpha_beta x = let to_alpha_beta x =
@ -62,6 +61,7 @@ let of_int64_array ~n_int ~alpha ~beta x =
end; end;
x x
let of_int64_array_no_check x = x
let of_bitlist_couple ?n_int ~alpha ~beta (xa,xb) = let of_bitlist_couple ?n_int ~alpha ~beta (xa,xb) =
let ba, bb = let ba, bb =

View File

@ -196,9 +196,8 @@ end = struct
let write_psi_coef ~n_det ~n_states c = let write_psi_coef ~n_det ~n_states c =
let n_det = Det_number.to_int n_det let n_det = Det_number.to_int n_det
and c = and c = Array.to_list c
Array.map Det_coef.to_float c |> List.map Det_coef.to_float
|> Array.to_list
and n_states = and n_states =
States_number.to_int n_states States_number.to_int n_states
in in
@ -240,11 +239,12 @@ end = struct
assert (n_int = dim.(0)); assert (n_int = dim.(0));
assert (dim.(1) = 2); assert (dim.(1) = 2);
assert (dim.(2) = (Det_number.to_int (read_n_det ()))); 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.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) ~n_int:(N_int_number.of_int n_int)
~alpha:n_alpha ~beta:n_beta ) ~alpha:n_alpha ~beta:n_beta )
|> Array.of_list
;; ;;
let write_psi_det ~n_int ~n_det d = let write_psi_det ~n_int ~n_det d =
@ -363,7 +363,7 @@ Determinants ::
" "
(b.expected_s2 |> Positive_float.to_string) (b.expected_s2 |> Positive_float.to_string)
(b.n_det |> Det_number.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 det_text
|> Rst_string.of_string |> Rst_string.of_string
;; ;;
@ -387,10 +387,10 @@ psi_det = %s
(b.n_states |> States_number.to_string) (b.n_states |> States_number.to_string)
(b.expected_s2 |> Positive_float.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.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 ", ") |> String.concat ", ")
(b.psi_det |> Array.map (Determinant.to_string ~mo_num) |> Array.to_list (b.psi_det |> Array.to_list |> List.map (Determinant.to_string
|> String.concat "\n\n") ~mo_num) |> String.concat "\n\n")
;; ;;
let of_rst r = let of_rst r =