From 65a5b87a434c32711982aa8c24861c2932af7afc Mon Sep 17 00:00:00 2001 From: Emmanuel Giner LCT Date: Fri, 25 Oct 2019 01:30:30 +0200 Subject: [PATCH] put the correct weight in the 2RDM --- src/casscf/get_energy.irp.f | 12 +++++++++--- src/two_body_rdm/orb_range_2_rdm.irp.f | 8 ++++---- src/two_body_rdm/orb_range_2_rdm_openmp.irp.f | 8 ++++---- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/casscf/get_energy.irp.f b/src/casscf/get_energy.irp.f index 3ff42fbc..1f572c9e 100644 --- a/src/casscf/get_energy.irp.f +++ b/src/casscf/get_energy.irp.f @@ -5,11 +5,17 @@ program print_2rdm ! ! useful to test the active part of the spin trace 2 rdms END_DOC - no_vvvv_integrals = .True. +!no_vvvv_integrals = .True. read_wf = .True. - touch read_wf no_vvvv_integrals +!touch read_wf no_vvvv_integrals !call routine - call routine_bis +!call routine_bis + call print_grad +end + +subroutine print_grad + implicit none + end subroutine routine_bis diff --git a/src/two_body_rdm/orb_range_2_rdm.irp.f b/src/two_body_rdm/orb_range_2_rdm.irp.f index d441e1df..b4ec8d87 100644 --- a/src/two_body_rdm/orb_range_2_rdm.irp.f +++ b/src/two_body_rdm/orb_range_2_rdm.irp.f @@ -9,7 +9,7 @@ ! = END_DOC allocate(state_weights(N_states)) - state_weights = 1.d0/dble(N_states) + state_weights = state_average_weight integer :: ispin ! condition for alpha/beta spin ispin = 1 @@ -26,7 +26,7 @@ ! = END_DOC allocate(state_weights(N_states)) - state_weights = 1.d0/dble(N_states) + state_weights = state_average_weight integer :: ispin ! condition for alpha/beta spin ispin = 2 @@ -43,7 +43,7 @@ ! = END_DOC allocate(state_weights(N_states)) - state_weights = 1.d0/dble(N_states) + state_weights = state_average_weight integer :: ispin ! condition for alpha/beta spin print*,'' @@ -70,7 +70,7 @@ END_DOC double precision, allocatable :: state_weights(:) allocate(state_weights(N_states)) - state_weights = 1.d0/dble(N_states) + state_weights = state_average_weight integer :: ispin ! condition for alpha/beta spin ispin = 4 diff --git a/src/two_body_rdm/orb_range_2_rdm_openmp.irp.f b/src/two_body_rdm/orb_range_2_rdm_openmp.irp.f index 386e2a54..baa26ced 100644 --- a/src/two_body_rdm/orb_range_2_rdm_openmp.irp.f +++ b/src/two_body_rdm/orb_range_2_rdm_openmp.irp.f @@ -7,7 +7,7 @@ ! = END_DOC allocate(state_weights(N_states)) - state_weights = 1.d0/dble(N_states) + state_weights = state_average_weight integer :: ispin ! condition for alpha/beta spin ispin = 1 @@ -24,7 +24,7 @@ ! = END_DOC allocate(state_weights(N_states)) - state_weights = 1.d0/dble(N_states) + state_weights = state_average_weight integer :: ispin ! condition for alpha/beta spin ispin = 2 @@ -41,7 +41,7 @@ ! = END_DOC allocate(state_weights(N_states)) - state_weights = 1.d0/dble(N_states) + state_weights = state_average_weight integer :: ispin ! condition for alpha/beta spin print*,'' @@ -68,7 +68,7 @@ END_DOC double precision, allocatable :: state_weights(:) allocate(state_weights(N_states)) - state_weights = 1.d0/dble(N_states) + state_weights = state_average_weight integer :: ispin ! condition for alpha/beta spin ispin = 4