From ac58cfd0cea5683a1d906ac83f35f10aaa1f9dcd Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 11 Apr 2016 10:48:36 +0200 Subject: [PATCH] Forgot files --- plugins/Psiref_CAS/overwrite_with_cas.irp.f | 3 +++ plugins/Psiref_Utils/extract_ref.irp.f | 24 +++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 plugins/Psiref_CAS/overwrite_with_cas.irp.f create mode 100644 plugins/Psiref_Utils/extract_ref.irp.f diff --git a/plugins/Psiref_CAS/overwrite_with_cas.irp.f b/plugins/Psiref_CAS/overwrite_with_cas.irp.f new file mode 100644 index 00000000..4d3d217d --- /dev/null +++ b/plugins/Psiref_CAS/overwrite_with_cas.irp.f @@ -0,0 +1,3 @@ +program overwrite_w_cas + call extract_ref +end diff --git a/plugins/Psiref_Utils/extract_ref.irp.f b/plugins/Psiref_Utils/extract_ref.irp.f new file mode 100644 index 00000000..0e9b5741 --- /dev/null +++ b/plugins/Psiref_Utils/extract_ref.irp.f @@ -0,0 +1,24 @@ +subroutine extract_ref + implicit none + BEGIN_DOC + ! Replaces the total wave function by the normalized projection on the reference + END_DOC + + integer :: i,j,k + do k=1,N_states + do j=1,N_det_ref + psi_coef(j,k) = psi_ref_coef_normalized(j,k) + enddo + enddo + + do j=1,N_det_ref + do k=1,N_int + psi_det(k,1,j) = psi_ref(k,1,j) + psi_det(k,2,j) = psi_ref(k,2,j) + enddo + enddo + N_det = N_det_ref + + call save_wavefunction + +end