mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-25 05:43:47 +01:00
Added barycentric PT
This commit is contained in:
parent
f3a79c2316
commit
85bb6ac5f4
@ -214,6 +214,26 @@ end = struct
|
|||||||
| _ -> raise (Invalid_argument (\"Wrong IO type : \"^s))
|
| _ -> raise (Invalid_argument (\"Wrong IO type : \"^s))
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
module Perturbation : sig
|
||||||
|
type t [@@deriving sexp]
|
||||||
|
val to_string : t -> string
|
||||||
|
val of_string : string -> t
|
||||||
|
end = struct
|
||||||
|
type t =
|
||||||
|
| EN
|
||||||
|
| Barycentric
|
||||||
|
[@@deriving sexp]
|
||||||
|
|
||||||
|
let to_string = function
|
||||||
|
| EN -> \"EN\"
|
||||||
|
| Barycentric -> \"Barycentric\"
|
||||||
|
let of_string s =
|
||||||
|
match (String.lowercase_ascii s) with
|
||||||
|
| \"en\" -> EN
|
||||||
|
| \"barycentric\" -> Barycentric
|
||||||
|
| _ -> raise (Invalid_argument (\"Wrong Perturbation type : \"^s))
|
||||||
|
end
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,11 +12,17 @@ BEGIN_PROVIDER [ double precision, pt2_E0_denominator, (N_states) ]
|
|||||||
! E0 in the denominator of the PT2
|
! E0 in the denominator of the PT2
|
||||||
END_DOC
|
END_DOC
|
||||||
if (initialize_pt2_E0_denominator) then
|
if (initialize_pt2_E0_denominator) then
|
||||||
pt2_E0_denominator(1:N_states) = psi_energy(1:N_states)
|
if (h0_type == "EN") then
|
||||||
|
pt2_E0_denominator(1:N_states) = psi_energy(1:N_states)
|
||||||
|
else if (h0_type == "Barycentric") then
|
||||||
|
pt2_E0_denominator(1:N_states) = barycentric_electronic_energy(1:N_states)
|
||||||
|
else
|
||||||
|
print *, h0_type, ' not implemented'
|
||||||
|
stop
|
||||||
|
endif
|
||||||
! call ezfio_get_full_ci_zmq_energy(pt2_E0_denominator(1))
|
! call ezfio_get_full_ci_zmq_energy(pt2_E0_denominator(1))
|
||||||
! pt2_E0_denominator(1) -= nuclear_repulsion
|
! pt2_E0_denominator(1) -= nuclear_repulsion
|
||||||
! pt2_E0_denominator(1:N_states) = HF_energy - nuclear_repulsion
|
! pt2_E0_denominator(1:N_states) = HF_energy - nuclear_repulsion
|
||||||
! pt2_E0_denominator(1:N_states) = barycentric_electronic_energy(1:N_states)
|
|
||||||
call write_double(6,pt2_E0_denominator(1)+nuclear_repulsion, 'PT2 Energy denominator')
|
call write_double(6,pt2_E0_denominator(1)+nuclear_repulsion, 'PT2 Energy denominator')
|
||||||
else
|
else
|
||||||
pt2_E0_denominator = -huge(1.d0)
|
pt2_E0_denominator = -huge(1.d0)
|
||||||
|
@ -62,4 +62,9 @@ doc: Thresholds on selectors (fraction of the norm) for final PT2 calculation
|
|||||||
interface: ezfio,provider,ocaml
|
interface: ezfio,provider,ocaml
|
||||||
default: 1.
|
default: 1.
|
||||||
|
|
||||||
|
[h0_type]
|
||||||
|
type: Perturbation
|
||||||
|
doc: Type of zeroth-order Hamiltonian [ EN | Barycentric ]
|
||||||
|
interface: ezfio,provider,ocaml
|
||||||
|
default: EN
|
||||||
|
|
||||||
|
22
plugins/shiftedbk/EZFIO.cfg
Normal file
22
plugins/shiftedbk/EZFIO.cfg
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[energy]
|
||||||
|
type: double precision
|
||||||
|
doc: Calculated energy
|
||||||
|
interface: ezfio
|
||||||
|
|
||||||
|
[thresh_dressed_ci]
|
||||||
|
type: Threshold
|
||||||
|
doc: Threshold on the convergence of the dressed CI energy
|
||||||
|
interface: ezfio,provider,ocaml
|
||||||
|
default: 1.e-5
|
||||||
|
|
||||||
|
[n_it_max_dressed_ci]
|
||||||
|
type: Strictly_positive_int
|
||||||
|
doc: Maximum number of dressed CI iterations
|
||||||
|
interface: ezfio,provider,ocaml
|
||||||
|
default: 10
|
||||||
|
|
||||||
|
[h0_type]
|
||||||
|
type: Perturbation
|
||||||
|
doc: Type of zeroth-order Hamiltonian [ EN | Barycentric ]
|
||||||
|
interface: ezfio,provider,ocaml
|
||||||
|
default: EN
|
@ -82,11 +82,14 @@ BEGIN_PROVIDER [ double precision, E0_denominator, (N_states) ]
|
|||||||
! E0 in the denominator of the PT2
|
! E0 in the denominator of the PT2
|
||||||
END_DOC
|
END_DOC
|
||||||
if (initialize_E0_denominator) then
|
if (initialize_E0_denominator) then
|
||||||
E0_denominator(1:N_states) = psi_energy(1:N_states)
|
if (h0_type == "EN") then
|
||||||
! call ezfio_get_full_ci_zmq_energy(pt2_E0_denominator(1))
|
E0_denominator(1:N_states) = psi_energy(1:N_states)
|
||||||
! E0_denominator(1) -= nuclear_repulsion
|
else if (h0_type == "Barycentric") then
|
||||||
! E0_denominator(1:N_states) = HF_energy - nuclear_repulsion
|
E0_denominator(1:N_states) = barycentric_electronic_energy(1:N_states)
|
||||||
! E0_denominator(1:N_states) = barycentric_electronic_energy(1:N_states)
|
else
|
||||||
|
print *, h0_type, ' not implemented'
|
||||||
|
stop
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
E0_denominator = -huge(1.d0)
|
E0_denominator = -huge(1.d0)
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user