10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-03 20:53:54 +01:00

updated cipsi

This commit is contained in:
Emmanuel Giner 2019-02-21 10:41:25 +01:00
parent cc21e47348
commit acf153a84e
3 changed files with 7 additions and 5 deletions

2
ocaml/.gitignore vendored
View File

@ -9,7 +9,6 @@ Input_ao_two_e_erf_ints.ml
Input_ao_two_e_ints.ml
Input_auto_generated.ml
Input_becke_numerical_grid.ml
Input_champ.ml
Input_davidson.ml
Input_density_for_dft.ml
Input_determinants.ml
@ -22,7 +21,6 @@ Input_nuclei.ml
Input_perturbation.ml
Input_pseudo.ml
Input_scf_utils.ml
Input_two_body_dm.ml
qp_create_ezfio
qp_create_ezfio.native
qp_edit

View File

@ -88,13 +88,13 @@ subroutine run_cipsi
(psi_energy_with_nucl_rep(1) + pt2(1) - hf_energy_ref)
correlation_energy_ratio = min(1.d0,correlation_energy_ratio)
call save_energy(psi_energy_with_nucl_rep, pt2)
call write_double(6,correlation_energy_ratio, 'Correlation ratio')
call print_summary(psi_energy_with_nucl_rep(1:N_states),pt2,error,variance,norm,N_det,N_occ_pattern,N_states,psi_s2)
do k=1,N_states
rpt2(:) = pt2(:)/(1.d0 + norm(k))
enddo
call save_energy(psi_energy_with_nucl_rep, rpt2)
call save_iterations(psi_energy_with_nucl_rep(1:N_states),rpt2,N_det)
call print_extrapolated_energy()
@ -136,6 +136,9 @@ subroutine run_cipsi
call ZMQ_pt2(psi_energy_with_nucl_rep, pt2,relative_error,error,variance, &
norm,0) ! Stochastic PT2
SOFT_TOUCH threshold_generators
do k=1,N_states
rpt2(:) = pt2(:)/(1.d0 + norm(k))
enddo
call save_energy(psi_energy_with_nucl_rep, pt2)
endif
print *, 'N_det = ', N_det
@ -149,6 +152,7 @@ subroutine run_cipsi
enddo
call print_summary(psi_energy_with_nucl_rep(1:N_states),pt2,error,variance,norm,N_det,N_occ_pattern,N_states,psi_s2)
call save_energy(psi_energy_with_nucl_rep, pt2)
call save_iterations(psi_energy_with_nucl_rep(1:N_states),rpt2,N_det)
call print_extrapolated_energy()
endif

View File

@ -83,13 +83,13 @@ subroutine run_stochastic_cipsi
(psi_energy_with_nucl_rep(1) + pt2(1) - hf_energy_ref)
correlation_energy_ratio = min(1.d0,correlation_energy_ratio)
call save_energy(psi_energy_with_nucl_rep, pt2)
call write_double(6,correlation_energy_ratio, 'Correlation ratio')
call print_summary(psi_energy_with_nucl_rep,pt2,error,variance,norm,N_det,N_occ_pattern,N_states,psi_s2)
do k=1,N_states
rpt2(:) = pt2(:)/(1.d0 + norm(k))
enddo
call save_energy(psi_energy_with_nucl_rep, rpt2)
call save_iterations(psi_energy_with_nucl_rep(1:N_states),rpt2,N_det)
call print_extrapolated_energy()
@ -125,11 +125,11 @@ subroutine run_stochastic_cipsi
norm = 0.d0
call ZMQ_pt2(psi_energy_with_nucl_rep, pt2,relative_error,error,variance, &
norm,0) ! Stochastic PT2
call save_energy(psi_energy_with_nucl_rep, pt2)
do k=1,N_states
rpt2(:) = pt2(:)/(1.d0 + norm(k))
enddo
call save_energy(psi_energy_with_nucl_rep, rpt2)
call print_summary(psi_energy_with_nucl_rep(1:N_states),pt2,error,variance,norm,N_det,N_occ_pattern,N_states,psi_s2)
call save_iterations(psi_energy_with_nucl_rep(1:N_states),rpt2,N_det)