diff --git a/ocaml/Input_ao_basis.ml b/ocaml/Input_ao_basis.ml index a17e6c91..d84974a8 100644 --- a/ocaml/Input_ao_basis.ml +++ b/ocaml/Input_ao_basis.ml @@ -16,6 +16,7 @@ module Ao_basis : sig ;; val read : unit -> t option val to_string : t -> string + val write : t -> unit val to_md5 : t -> MD5.t val to_rst : t -> Rst_string.t end = struct @@ -132,6 +133,34 @@ end = struct ;; + + let write_md5 b = + to_md5 b + |> MD5.to_string + |> Ezfio.set_ao_basis_ao_md5 + ;; + + let write_ao_basis name = + AO_basis_name.to_string name + |> Ezfio.set_ao_basis_ao_basis + ;; + + let write b = + let { ao_basis ; + ao_num ; + ao_prim_num ; + ao_prim_num_max ; + ao_nucl ; + ao_power ; + ao_coef ; + ao_expo ; + } = b + in + write_md5 b ; + write_ao_basis ao_basis; + ;; + + let read () = if (Ezfio.has_ao_basis_ao_basis ()) then begin diff --git a/ocaml/Makefile b/ocaml/Makefile index 030fdd38..8fb3837f 100644 --- a/ocaml/Makefile +++ b/ocaml/Makefile @@ -1,5 +1,7 @@ # Check if QPACKAGE_ROOT is defined +.NOPARALLEL: + ifndef QPACKAGE_ROOT $(info -------------------- Error --------------------) $(info QPACKAGE_ROOT undefined. Source the quantum_package.rc script) diff --git a/ocaml/qp_create_ezfio_from_xyz.ml b/ocaml/qp_create_ezfio_from_xyz.ml index 2965b37a..785e3a4e 100644 --- a/ocaml/qp_create_ezfio_from_xyz.ml +++ b/ocaml/qp_create_ezfio_from_xyz.ml @@ -214,6 +214,12 @@ let run ?o b c m xyz_file = ~rank:2 ~dim:[| ao_num ; ao_prim_num_max |] ~data:ao_coef) ; Ezfio.set_ao_basis_ao_expo(Ezfio.ezfio_array_of_list ~rank:2 ~dim:[| ao_num ; ao_prim_num_max |] ~data:ao_expo) ; + + + match Input.Ao_basis.read () with + | None -> failwith "Error in basis" + | Some x -> Input.Ao_basis.write x + ;; let command = diff --git a/ocaml/qptypes_generator.ml b/ocaml/qptypes_generator.ml index a625dade..e47213ff 100644 --- a/ocaml/qptypes_generator.ml +++ b/ocaml/qptypes_generator.ml @@ -97,6 +97,8 @@ let input_data = " * MD5 : string assert ((String.length x) = 32); + assert (String.fold x ~init:true ~f:(fun accu x -> + accu && (x < 'g'))); * Rst_string : string diff --git a/src/Full_CI/NEEDED_MODULES b/src/Full_CI/NEEDED_MODULES index 8a732901..f6002738 100644 --- a/src/Full_CI/NEEDED_MODULES +++ b/src/Full_CI/NEEDED_MODULES @@ -1 +1,2 @@ -AOs BiInts Bitmask Dets Electrons Ezfio_files Generators_full Hartree_Fock MonoInts MOs Nuclei Output Selectors_full Utils Perturbation +AOs BiInts Bitmask Dets Electrons Ezfio_files Generators_full Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Selectors_full Utils + diff --git a/src/Full_CI/full_ci.ezfio_config b/src/Full_CI/full_ci.ezfio_config index 022f40ac..c9c4b3b6 100644 --- a/src/Full_CI/full_ci.ezfio_config +++ b/src/Full_CI/full_ci.ezfio_config @@ -1,4 +1,6 @@ full_ci - n_det_max_fci integer - pt2_max double precision - do_pt2_end logical + n_det_max_fci integer + pt2_max double precision + do_pt2_end logical + energy double precision + energy_pt2 double precision diff --git a/src/Full_CI/full_ci.irp.f b/src/Full_CI/full_ci.irp.f index 08acb9cb..6435ee3c 100644 --- a/src/Full_CI/full_ci.irp.f +++ b/src/Full_CI/full_ci.irp.f @@ -49,6 +49,7 @@ program full_ci print *, 'E = ', CI_energy print *, 'E+PT2 = ', CI_energy+pt2 print *, '-----' + call ezfio_set_full_ci_energy(CI_energy) if (abort_all) then exit endif @@ -70,6 +71,7 @@ program full_ci print *, 'E = ', CI_energy print *, 'E+PT2 = ', CI_energy+pt2 print *, '-----' + call ezfio_set_full_ci_energy_pt2(CI_energy+pt2) endif deallocate(pt2,norm_pert) end diff --git a/src/Hartree_Fock/damping_SCF.irp.f b/src/Hartree_Fock/damping_SCF.irp.f index 092bd15f..82b448a9 100644 --- a/src/Hartree_Fock/damping_SCF.irp.f +++ b/src/Hartree_Fock/damping_SCF.irp.f @@ -119,5 +119,7 @@ subroutine damping_SCF call write_double(output_hartree_fock, HF_energy, 'Hartree-Fock energy') call write_time(output_hartree_fock) + call ezfio_set_hartree_fock_energy(HF_energy) + deallocate(D_alpha,D_beta,F_new,D_new_alpha,D_new_beta,delta_alpha,delta_beta) end diff --git a/src/Hartree_Fock/hartree_fock.ezfio_config b/src/Hartree_Fock/hartree_fock.ezfio_config index bbb383f9..07030bc9 100644 --- a/src/Hartree_Fock/hartree_fock.ezfio_config +++ b/src/Hartree_Fock/hartree_fock.ezfio_config @@ -1,4 +1,5 @@ hartree_fock thresh_scf double precision n_it_scf_max integer + energy double precision diff --git a/src/MOGuess/H_CORE_guess.irp.f b/src/MOGuess/H_CORE_guess.irp.f index 5e144cc6..17b53aaa 100644 --- a/src/MOGuess/H_CORE_guess.irp.f +++ b/src/MOGuess/H_CORE_guess.irp.f @@ -5,7 +5,7 @@ program H_CORE_guess TOUCH mo_coef label = "Guess" call mo_as_eigvectors_of_mo_matrix(mo_mono_elec_integral,size(mo_mono_elec_integral,1),size(mo_mono_elec_integral,2),label) + print *, 'save mos' call save_mos - end diff --git a/src/NEEDED_MODULES b/src/NEEDED_MODULES index f6551dd9..3f5f6001 100644 --- a/src/NEEDED_MODULES +++ b/src/NEEDED_MODULES @@ -1 +1,2 @@ -AOs BiInts Bitmask Dets Electrons Ezfio_files Hartree_Fock MonoInts MOs Nuclei Output Utils +AOs BiInts Bitmask Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Utils +