From eed703afa9a1e63e797851748c4a99f2b4b7525f Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 23 Dec 2020 00:29:55 +0100 Subject: [PATCH] Added entropy --- devel/svdwf/svdwf.irp.f | 18 +++++++++++------- stable/amplitudes/EZFIO.cfg.save | 7 ------- 2 files changed, 11 insertions(+), 14 deletions(-) delete mode 100644 stable/amplitudes/EZFIO.cfg.save diff --git a/devel/svdwf/svdwf.irp.f b/devel/svdwf/svdwf.irp.f index a53b48d..dfdcc80 100644 --- a/devel/svdwf/svdwf.irp.f +++ b/devel/svdwf/svdwf.irp.f @@ -12,6 +12,7 @@ subroutine run implicit none double precision, allocatable :: U(:,:), Vt(:,:), D(:), A(:,:) integer :: i, j, k, p, q + double precision :: entropy allocate( A (n_det_alpha_unique, n_det_beta_unique), & U (n_det_alpha_unique, n_det_alpha_unique), & @@ -29,19 +30,22 @@ subroutine run U, size(U,1), D, Vt, size(Vt,1), n_det_alpha_unique, n_det_beta_unique, & 6,1000) + entropy = 0.d0 do i=1,n_det_beta_unique print *, i, real(D(i)), real(D(i)**2), real(sum(D(1:i)**2)) + entropy -= D(i) * dlog(D(i)) if (D(i) < 1.d-15) then k = i exit endif enddo print *, 'threshold: ', 2.858 * D(k/2) - do i=1,n_det_alpha_unique - print '(I6,4(X,F12.8))', i, U(i,1:4) - enddo - print *, '' - do i=1,n_det_beta_unique - print '(I6,4(X,F12.8))', i, Vt(1:4,i) - enddo + print *, 'Entropy : ', entropy +! do i=1,n_det_alpha_unique +! print '(I6,4(X,F12.8))', i, U(i,1:4) +! enddo +! print *, '' +! do i=1,n_det_beta_unique +! print '(I6,4(X,F12.8))', i, Vt(1:4,i) +! enddo end diff --git a/stable/amplitudes/EZFIO.cfg.save b/stable/amplitudes/EZFIO.cfg.save deleted file mode 100644 index 66ef730..0000000 --- a/stable/amplitudes/EZFIO.cfg.save +++ /dev/null @@ -1,7 +0,0 @@ -[t1_amplitudes] -type: double precision -doc: Amplitudes for the single-excitation operator -interface: ezfio,provider -size: (mo_basis.mo_num,mo_basis.mo_num) - -