From 31557a1180974405eedee9be175335ad38cc4505 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 20 Nov 2017 12:25:12 +0100 Subject: [PATCH] Bohr possible in xyz --- ocaml/qp_create_ezfio_from_xyz.ml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ocaml/qp_create_ezfio_from_xyz.ml b/ocaml/qp_create_ezfio_from_xyz.ml index 410590a2..93c8c8ff 100644 --- a/ocaml/qp_create_ezfio_from_xyz.ml +++ b/ocaml/qp_create_ezfio_from_xyz.ml @@ -9,6 +9,8 @@ let spec = ~doc:"file Name of the created EZFIO file." +> flag "b" (required string) ~doc:"string Name of basis set." + +> flag "au" no_arg + ~doc:"Input geometry is in atomic units." +> flag "c" (optional_with_default 0 int) ~doc:"int Total charge of the molecule. Default is 0." +> flag "d" (optional_with_default 0. float) @@ -92,12 +94,16 @@ let list_basis () = (** Run the program *) -let run ?o b c d m p cart xyz_file = +let run ?o b au c d m p cart xyz_file = (* Read molecule *) let molecule = - (Molecule.of_file xyz_file ~charge:(Charge.of_int c) - ~multiplicity:(Multiplicity.of_int m) ) + if au then + (Molecule.of_file xyz_file ~charge:(Charge.of_int c) + ~multiplicity:(Multiplicity.of_int m) ~units:Units.Bohr) + else + (Molecule.of_file xyz_file ~charge:(Charge.of_int c) + ~multiplicity:(Multiplicity.of_int m) ) in let dummy = dummy_centers ~threshold:d ~molecule ~nuclei:molecule.Molecule.nuclei @@ -682,8 +688,8 @@ Otherwise, the basis set is obtained from the database. " ) spec - (fun o b c d m p cart xyz_file () -> - run ?o b c d m p cart xyz_file ) + (fun o b au c d m p cart xyz_file () -> + run ?o b au c d m p cart xyz_file ) let () =