mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-23 04:43:50 +01:00
Print ao symmetries
This commit is contained in:
parent
39a8d4101f
commit
90ccf82824
@ -142,6 +142,22 @@ end = struct
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
let to_rst b =
|
let to_rst b =
|
||||||
|
let print_sym =
|
||||||
|
let l = List.init (Array.length b.ao_power) ~f:(
|
||||||
|
fun i -> ( (i+1),b.ao_nucl.(i),b.ao_power.(i) ) ) in
|
||||||
|
let rec do_work count = function
|
||||||
|
| [] -> []
|
||||||
|
| (i,n,x)::tail ->
|
||||||
|
if (count < 2) then
|
||||||
|
(Printf.sprintf " (%4d) %d:%-8s" i (Nucl_number.to_int n) (Symmetry.Xyz.to_string x))::
|
||||||
|
(do_work (count+1) tail)
|
||||||
|
else
|
||||||
|
(Printf.sprintf " (%4d) %d:%-8s\n" i (Nucl_number.to_int n) (Symmetry.Xyz.to_string x))::
|
||||||
|
(do_work 0 tail)
|
||||||
|
in do_work 0 l
|
||||||
|
|> String.concat
|
||||||
|
in
|
||||||
|
|
||||||
let short_basis = to_basis b in
|
let short_basis = to_basis b in
|
||||||
Printf.sprintf "
|
Printf.sprintf "
|
||||||
Name of the AO basis ::
|
Name of the AO basis ::
|
||||||
@ -152,12 +168,16 @@ Basis set ::
|
|||||||
|
|
||||||
%s
|
%s
|
||||||
|
|
||||||
|
Symmetries ::
|
||||||
|
|
||||||
|
%s
|
||||||
|
|
||||||
" b.ao_basis
|
" b.ao_basis
|
||||||
(Basis.to_string short_basis
|
(Basis.to_string short_basis
|
||||||
|> String.split ~on:'\n'
|
|> String.split ~on:'\n'
|
||||||
|> List.map ~f:(fun x-> " "^x)
|
|> List.map ~f:(fun x-> " "^x)
|
||||||
|> String.concat ~sep:"\n"
|
|> String.concat ~sep:"\n"
|
||||||
)
|
) print_sym
|
||||||
|> Rst_string.of_string
|
|> Rst_string.of_string
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -131,4 +131,4 @@ test_bielec_intergals ();;
|
|||||||
test_electrons();
|
test_electrons();
|
||||||
*)
|
*)
|
||||||
|
|
||||||
test_fci();
|
test_ao();
|
||||||
|
Loading…
Reference in New Issue
Block a user