From 0bf0513fb13623d3a2807c11a8316eea51a72705 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 11 Jun 2021 14:18:23 +0200 Subject: [PATCH] Added VERSION file --- VERSION | 1 + ocaml/qp_create_ezfio.ml | 27 ++++++++++++++++++++++++--- src/ao_basis/aos.irp.f | 10 +++++++--- src/basis/EZFIO.cfg | 10 ++++++++-- 4 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 VERSION diff --git a/VERSION b/VERSION new file mode 100644 index 00000000..c043eea7 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +2.2.1 diff --git a/ocaml/qp_create_ezfio.ml b/ocaml/qp_create_ezfio.ml index e4ead21b..a4865e2b 100644 --- a/ocaml/qp_create_ezfio.ml +++ b/ocaml/qp_create_ezfio.ml @@ -604,9 +604,30 @@ let run ?o b au c d m p cart xyz_file = ~rank:1 ~dim:[| shell_num |] ~data:ang_mom ) ; Ezfio.set_basis_shell_prim_index (Ezfio.ezfio_array_of_list ~rank:1 ~dim:[| shell_num |] ~data:shell_prim_idx) ; - Ezfio.set_basis_shell_nucl (Ezfio.ezfio_array_of_list - ~rank:1 ~dim:[| shell_num |] - ~data:(list_map (fun (_,n) -> Nucl_number.to_int n) basis) ) ; + Ezfio.set_basis_basis_nucleus_index (Ezfio.ezfio_array_of_list + ~rank:1 ~dim:[| nucl_num |] + ~data:( + list_map (fun (_,n) -> Nucl_number.to_int n) basis + |> List.fold_left (fun accu i -> + match accu with + | [] -> [] + | (h,j) :: rest -> if j == i then ((h+1,j)::rest) else ((h+1,i)::(h+1,j)::rest) + ) [(0,0)] + |> List.rev + |> List.map fst + )) ; + Ezfio.set_basis_nucleus_shell_num(Ezfio.ezfio_array_of_list + ~rank:1 ~dim:[| nucl_num |] + ~data:( + list_map (fun (_,n) -> Nucl_number.to_int n) basis + |> List.fold_left (fun accu i -> + match accu with + | [] -> [(1,i)] + | (h,j) :: rest -> if j == i then ((h+1,j)::rest) else ((1,i)::(h,j)::rest) + ) [] + |> List.rev + |> List.map fst + )) ; Ezfio.set_basis_prim_coef (Ezfio.ezfio_array_of_list ~rank:1 ~dim:[| prim_num |] ~data:coef) ; Ezfio.set_basis_prim_expo (Ezfio.ezfio_array_of_list diff --git a/src/ao_basis/aos.irp.f b/src/ao_basis/aos.irp.f index 2ff72898..17aa784d 100644 --- a/src/ao_basis/aos.irp.f +++ b/src/ao_basis/aos.irp.f @@ -40,9 +40,9 @@ END_PROVIDER do i=1,ao_num - powA(1) = ao_power(i,1) - powA(2) = ao_power(i,2) - powA(3) = ao_power(i,3) + powA(1) = ao_power(i,1) + ao_power(i,2) + ao_power(i,3) + powA(2) = 0 + powA(3) = 0 ! Normalization of the primitives if (primitives_normalized) then @@ -57,6 +57,10 @@ END_PROVIDER enddo endif + powA(1) = ao_power(i,1) + powA(2) = ao_power(i,2) + powA(3) = ao_power(i,3) + ! Normalization of the contracted basis functions if (ao_normalized) then norm = 0.d0 diff --git a/src/basis/EZFIO.cfg b/src/basis/EZFIO.cfg index 42123373..7f2ede4c 100644 --- a/src/basis/EZFIO.cfg +++ b/src/basis/EZFIO.cfg @@ -13,6 +13,12 @@ type: integer doc: Number of shells interface: ezfio, provider +[nucleus_shell_num] +type: integer +doc: Number of shells per nucleus +size: (nuclei.nucl_num) +interface: ezfio, provider + [shell_normalization_factor] type: double precision doc: Normalization factor applied to the whole shell, ex $1/\sqrt{ }$ @@ -37,10 +43,10 @@ doc: Max number of primitives in a shell size: (basis.shell_num) interface: ezfio, provider -[shell_nucl] +[basis_nucleus_index] type: integer doc: Index of the nucleus on which the shell is centered -size: (basis.shell_num) +size: (nuclei.nucl_num) interface: ezfio, provider [prim_normalization_factor]