From 8fab38fcc07a315b3cc7e7eddce6eefc5b0f4626 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 4 May 2015 20:19:59 +0200 Subject: [PATCH] InteRgrals corrected --- ocaml/qp_create_ezfio_from_xyz.ml | 12 ++++++++---- scripts/pseudo/put_pseudo_in_ezfio.py | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/ocaml/qp_create_ezfio_from_xyz.ml b/ocaml/qp_create_ezfio_from_xyz.ml index 8370fb1f..4a85a1ec 100644 --- a/ocaml/qp_create_ezfio_from_xyz.ml +++ b/ocaml/qp_create_ezfio_from_xyz.ml @@ -13,8 +13,8 @@ let spec = ~doc:"int Total charge of the molecule. Default is 0." +> flag "m" (optional_with_default 1 int) ~doc:"int Spin multiplicity (2S+1) of the molecule. Default is 1." - +> flag "p" (optional_with_default 0 int) - ~doc:"Using pseudo. Default is not (aka 0)" + +> flag "p" no_arg + ~doc:"Using pseudo." +> anon ("xyz_file" %: string) ;; @@ -62,7 +62,7 @@ let run ?o b c m p xyz_file = | None -> (* Principal basis *) let basis = elem_and_basis_name in let command = - if (p = 0) then + if (p) then Qpackage.root ^ "/scripts/get_basis.sh \"" ^ temp_filename ^ "\" \"" ^ basis ^"\"" else @@ -254,7 +254,11 @@ let run ?o b c m p xyz_file = (* Doesn't work... *) - (* if p = 1 then Qpackage.root ^ "scripts/pseudo/put_pseudo_in_ezfio.py" ezfio_file.to_string; *) + if (p) then + begin + Qpackage.root ^ "/scripts/pseudo/put_pseudo_in_ezfio.py " ^ ezfio_file + |> Sys.command_exn + end; match Input.Ao_basis.read () with | None -> failwith "Error in basis" diff --git a/scripts/pseudo/put_pseudo_in_ezfio.py b/scripts/pseudo/put_pseudo_in_ezfio.py index 87db7845..1f8594c5 100755 --- a/scripts/pseudo/put_pseudo_in_ezfio.py +++ b/scripts/pseudo/put_pseudo_in_ezfio.py @@ -311,11 +311,11 @@ if __name__ == "__main__": # ~#~#~#~#~ # klocmax = max([len(i) for i in v_k]) - ezfio.pseudo_intergrals_klocmax = klocmax + ezfio.pseudo_integrals_klocmax = klocmax - ezfio.pseudo_intergrals_v_k = zip(*v_k) - ezfio.pseudo_intergrals_n_k = zip(*n_k) - ezfio.pseudo_intergrals_dz_k = zip(*dz_k) + ezfio.pseudo_integrals_v_k = zip(*v_k) + ezfio.pseudo_integrals_n_k = zip(*n_k) + ezfio.pseudo_integrals_dz_k = zip(*dz_k) # ~#~#~#~#~#~#~#~#~ # # N o n _ L o c a l # @@ -324,15 +324,15 @@ if __name__ == "__main__": lmax = max([len(i) for i in v_kl]) kmax = max([len(sublist) for list_ in v_kl for sublist in list_]) - ezfio.pseudo_intergrals_lmaxpo = lmax - ezfio.pseudo_intergrals_kmax = kmax + ezfio.pseudo_integrals_lmaxpo = lmax + ezfio.pseudo_integrals_kmax = kmax v_kl = make_it_square(v_kl, [lmax, kmax]) n_kl = make_it_square(n_kl, [lmax, kmax], int) dz_kl = make_it_square(dz_kl, [lmax, kmax]) - ezfio.pseudo_intergrals_v_kl = zip(*v_kl) - ezfio.pseudo_intergrals_n_kl = zip(*n_kl) - ezfio.pseudo_intergrals_dz_kl = zip(*dz_kl) + ezfio.pseudo_integrals_v_kl = zip(*v_kl) + ezfio.pseudo_integrals_n_kl = zip(*n_kl) + ezfio.pseudo_integrals_dz_kl = zip(*dz_kl) - ezfio.pseudo_intergrals_do_pseudo = True + ezfio.pseudo_integrals_do_pseudo = True