10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-06-29 08:24:51 +02:00

save energy in ezfio

This commit is contained in:
Anthony Scemama 2015-01-06 19:12:17 +01:00
parent 85cf60bc97
commit 2365aeb4da
11 changed files with 54 additions and 6 deletions

View File

@ -16,6 +16,7 @@ module Ao_basis : sig
;; ;;
val read : unit -> t option val read : unit -> t option
val to_string : t -> string val to_string : t -> string
val write : t -> unit
val to_md5 : t -> MD5.t val to_md5 : t -> MD5.t
val to_rst : t -> Rst_string.t val to_rst : t -> Rst_string.t
end = struct 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 () = let read () =
if (Ezfio.has_ao_basis_ao_basis ()) then if (Ezfio.has_ao_basis_ao_basis ()) then
begin begin

View File

@ -1,5 +1,7 @@
# Check if QPACKAGE_ROOT is defined # Check if QPACKAGE_ROOT is defined
.NOPARALLEL:
ifndef QPACKAGE_ROOT ifndef QPACKAGE_ROOT
$(info -------------------- Error --------------------) $(info -------------------- Error --------------------)
$(info QPACKAGE_ROOT undefined. Source the quantum_package.rc script) $(info QPACKAGE_ROOT undefined. Source the quantum_package.rc script)

View File

@ -214,6 +214,12 @@ let run ?o b c m xyz_file =
~rank:2 ~dim:[| ao_num ; ao_prim_num_max |] ~data:ao_coef) ; ~rank:2 ~dim:[| ao_num ; ao_prim_num_max |] ~data:ao_coef) ;
Ezfio.set_ao_basis_ao_expo(Ezfio.ezfio_array_of_list Ezfio.set_ao_basis_ao_expo(Ezfio.ezfio_array_of_list
~rank:2 ~dim:[| ao_num ; ao_prim_num_max |] ~data:ao_expo) ; ~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 = let command =

View File

@ -97,6 +97,8 @@ let input_data = "
* MD5 : string * MD5 : string
assert ((String.length x) = 32); assert ((String.length x) = 32);
assert (String.fold x ~init:true ~f:(fun accu x ->
accu && (x < 'g')));
* Rst_string : string * Rst_string : string

View File

@ -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

View File

@ -1,4 +1,6 @@
full_ci full_ci
n_det_max_fci integer n_det_max_fci integer
pt2_max double precision pt2_max double precision
do_pt2_end logical do_pt2_end logical
energy double precision
energy_pt2 double precision

View File

@ -49,6 +49,7 @@ program full_ci
print *, 'E = ', CI_energy print *, 'E = ', CI_energy
print *, 'E+PT2 = ', CI_energy+pt2 print *, 'E+PT2 = ', CI_energy+pt2
print *, '-----' print *, '-----'
call ezfio_set_full_ci_energy(CI_energy)
if (abort_all) then if (abort_all) then
exit exit
endif endif
@ -70,6 +71,7 @@ program full_ci
print *, 'E = ', CI_energy print *, 'E = ', CI_energy
print *, 'E+PT2 = ', CI_energy+pt2 print *, 'E+PT2 = ', CI_energy+pt2
print *, '-----' print *, '-----'
call ezfio_set_full_ci_energy_pt2(CI_energy+pt2)
endif endif
deallocate(pt2,norm_pert) deallocate(pt2,norm_pert)
end end

View File

@ -119,5 +119,7 @@ subroutine damping_SCF
call write_double(output_hartree_fock, HF_energy, 'Hartree-Fock energy') call write_double(output_hartree_fock, HF_energy, 'Hartree-Fock energy')
call write_time(output_hartree_fock) 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) deallocate(D_alpha,D_beta,F_new,D_new_alpha,D_new_beta,delta_alpha,delta_beta)
end end

View File

@ -1,4 +1,5 @@
hartree_fock hartree_fock
thresh_scf double precision thresh_scf double precision
n_it_scf_max integer n_it_scf_max integer
energy double precision

View File

@ -5,7 +5,7 @@ program H_CORE_guess
TOUCH mo_coef TOUCH mo_coef
label = "Guess" 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) 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 call save_mos
end end

View File

@ -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