Compare commits
2 Commits
88cffcb269
...
4fe07d97b0
Author | SHA1 | Date |
---|---|---|
Anthony Scemama | 4fe07d97b0 | |
Anthony Scemama | 43b83ee8e9 |
|
@ -802,8 +802,12 @@ if __name__ == "__main__":
|
|||
pickle_path = os.path.join(QP_ROOT, "config", "qp_create_ninja.pickle")
|
||||
|
||||
if arguments["update"]:
|
||||
try:
|
||||
with open(pickle_path, 'rb') as handle:
|
||||
arguments = pickle.load(handle)
|
||||
except FileNotFoundError:
|
||||
print("\n-----\nError: Please run 'configure -c config/<config_file>'\n-----\n")
|
||||
raise
|
||||
|
||||
elif arguments["create"]:
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
use bitmasks
|
||||
BEGIN_SHELL [ /usr/bin/env python3 ]
|
||||
from generate_h_apply import *
|
||||
from perturbation import perturbations
|
||||
|
||||
s = H_apply("mp2")
|
||||
s.set_perturbation("Moller_plesset")
|
||||
#s.set_perturbation("epstein_nesbet")
|
||||
print(s)
|
||||
|
||||
s = H_apply("mp2_selection")
|
||||
s.set_selection_pt2("Moller_Plesset")
|
||||
print(s)
|
||||
END_SHELL
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
generators_full
|
||||
selectors_full
|
||||
determinants
|
||||
davidson
|
||||
davidson_undressed
|
||||
perturbation
|
|
@ -0,0 +1,4 @@
|
|||
===
|
||||
mp2
|
||||
===
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
program mp2
|
||||
call run
|
||||
end
|
||||
|
||||
subroutine run
|
||||
implicit none
|
||||
double precision, allocatable :: pt2(:), norm_pert(:)
|
||||
double precision :: H_pert_diag, E_old
|
||||
integer :: N_st, iter
|
||||
PROVIDE Fock_matrix_diag_mo H_apply_buffer_allocated
|
||||
N_st = N_states
|
||||
allocate (pt2(N_st), norm_pert(N_st))
|
||||
E_old = HF_energy
|
||||
call H_apply_mp2(pt2, norm_pert, H_pert_diag, N_st)
|
||||
print *, 'N_det = ', N_det
|
||||
print *, 'N_states = ', N_states
|
||||
print *, 'MP2 = ', pt2
|
||||
print *, 'E = ', E_old
|
||||
print *, 'E+MP2 = ', E_old+pt2
|
||||
deallocate(pt2,norm_pert)
|
||||
end
|
Loading…
Reference in New Issue