From b45b9507178865cfa4db9aec9157e1a6a9f62882 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 29 Oct 2014 00:50:59 +0100 Subject: [PATCH] Printing determinants with Nint > 1 --- ocaml/Bitlist.ml | 4 ++-- ocaml/Determinant.ml | 2 +- ocaml/Input_nuclei.ml | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ocaml/Bitlist.ml b/ocaml/Bitlist.ml index 7e2d774e..f5f08285 100644 --- a/ocaml/Bitlist.ml +++ b/ocaml/Bitlist.ml @@ -58,8 +58,8 @@ let to_int64 l = (* Create a bit list from a list of int64 *) let of_int64_list l = let list_of_lists = List.map of_int64 l in - let result = List.rev list_of_lists in - List.flatten result +(* let result = List.rev list_of_lists in *) + List.flatten list_of_lists ;; (* Compute n_int *) diff --git a/ocaml/Determinant.ml b/ocaml/Determinant.ml index 6aa09101..6f2dd4c9 100644 --- a/ocaml/Determinant.ml +++ b/ocaml/Determinant.ml @@ -41,7 +41,7 @@ let bitlist_to_string ~mo_tot_num x = | Bit.Zero -> "-" | Bit.One -> "+" ) |> String.concat - |> String.sub ~pos:0 ~len:(MO_number.to_int mo_tot_num) + |> String.sub ~pos:0 ~len:(MO_number.to_int mo_tot_num) ;; let to_string ~mo_tot_num x = diff --git a/ocaml/Input_nuclei.ml b/ocaml/Input_nuclei.ml index e56febf9..7ea73970 100644 --- a/ocaml/Input_nuclei.ml +++ b/ocaml/Input_nuclei.ml @@ -12,6 +12,7 @@ module Nuclei : sig ;; val read : unit -> t val debug : t -> string + val to_string : t -> string end = struct type t = { nucl_num : Nucl_number.t ; @@ -79,7 +80,10 @@ nucl_coord = %s ~f:(Charge.to_string) |> String.concat ~sep:", " ) (b.nucl_coord |> Array.to_list |> List.map ~f:(Point3d.to_string Units.Bohr) |> String.concat ~sep:"\n" ) + ;; + let to_string = debug +;; end