mirror of
https://github.com/QuantumPackage/qp2.git
synced 2025-04-28 11:14:43 +02:00
separated psi_coef_min/max from abs_psi_coef_min/max
This commit is contained in:
parent
315ad54dc7
commit
953cf04616
@ -424,24 +424,46 @@ end
|
||||
|
||||
BEGIN_PROVIDER [ double precision, psi_coef_max, (N_states) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_coef_min, (N_states) ]
|
||||
&BEGIN_PROVIDER [ double precision, abs_psi_coef_max, (N_states) ]
|
||||
&BEGIN_PROVIDER [ double precision, abs_psi_coef_min, (N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Max and min values of the coefficients
|
||||
END_DOC
|
||||
integer :: i
|
||||
do i=1,N_states
|
||||
psi_coef_min(i) = minval(psi_coef(:,i))
|
||||
psi_coef_max(i) = maxval(psi_coef(:,i))
|
||||
abs_psi_coef_min(i) = minval( dabs(psi_coef(:,i)) )
|
||||
abs_psi_coef_max(i) = maxval( dabs(psi_coef(:,i)) )
|
||||
call write_double(6,psi_coef_max(i), 'Max coef')
|
||||
call write_double(6,psi_coef_min(i), 'Min coef')
|
||||
call write_double(6,abs_psi_coef_max(i), 'Max abs coef')
|
||||
call write_double(6,abs_psi_coef_min(i), 'Min abs coef')
|
||||
enddo
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Max and min values of the coefficients
|
||||
END_DOC
|
||||
integer :: i
|
||||
if (is_complex) then
|
||||
print*,irp_here,' not implemented for complex'
|
||||
stop -1
|
||||
endif
|
||||
do i=1,N_states
|
||||
psi_coef_min(i) = minval(psi_coef(:,i))
|
||||
psi_coef_max(i) = maxval(psi_coef(:,i))
|
||||
call write_double(6,psi_coef_max(i), 'Max coef')
|
||||
call write_double(6,psi_coef_min(i), 'Min coef')
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, abs_psi_coef_max, (N_states) ]
|
||||
&BEGIN_PROVIDER [ double precision, abs_psi_coef_min, (N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Max and min magnitudes of the coefficients
|
||||
END_DOC
|
||||
integer :: i
|
||||
if (is_complex) then
|
||||
do i=1,N_states
|
||||
abs_psi_coef_min(i) = minval( cdabs(psi_coef_complex(:,i)) )
|
||||
abs_psi_coef_max(i) = maxval( cdabs(psi_coef_complex(:,i)) )
|
||||
call write_double(6,abs_psi_coef_max(i), 'Max abs coef')
|
||||
call write_double(6,abs_psi_coef_min(i), 'Min abs coef')
|
||||
enddo
|
||||
else
|
||||
do i=1,N_states
|
||||
abs_psi_coef_min(i) = minval( dabs(psi_coef(:,i)) )
|
||||
abs_psi_coef_max(i) = maxval( dabs(psi_coef(:,i)) )
|
||||
call write_double(6,abs_psi_coef_max(i), 'Max abs coef')
|
||||
call write_double(6,abs_psi_coef_min(i), 'Min abs coef')
|
||||
enddo
|
||||
endif
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
|
@ -180,30 +180,6 @@ subroutine sort_dets_by_det_search_key_complex(Ndet, det_in, coef_in, sze, det_o
|
||||
end
|
||||
|
||||
|
||||
! TODO:complex? only keep abs max/min? real max/min?
|
||||
! BEGIN_PROVIDER [ double precision, psi_coef_max, (N_states) ]
|
||||
!&BEGIN_PROVIDER [ double precision, psi_coef_min, (N_states) ]
|
||||
!&BEGIN_PROVIDER [ double precision, abs_psi_coef_max, (N_states) ]
|
||||
!&BEGIN_PROVIDER [ double precision, abs_psi_coef_min, (N_states) ]
|
||||
! implicit none
|
||||
! BEGIN_DOC
|
||||
! ! Max and min values of the coefficients
|
||||
! END_DOC
|
||||
! integer :: i
|
||||
! do i=1,N_states
|
||||
! psi_coef_min(i) = minval(psi_coef(:,i))
|
||||
! psi_coef_max(i) = maxval(psi_coef(:,i))
|
||||
! abs_psi_coef_min(i) = minval( dabs(psi_coef(:,i)) )
|
||||
! abs_psi_coef_max(i) = maxval( dabs(psi_coef(:,i)) )
|
||||
! call write_double(6,psi_coef_max(i), 'Max coef')
|
||||
! call write_double(6,psi_coef_min(i), 'Min coef')
|
||||
! call write_double(6,abs_psi_coef_max(i), 'Max abs coef')
|
||||
! call write_double(6,abs_psi_coef_min(i), 'Min abs coef')
|
||||
! enddo
|
||||
!
|
||||
!END_PROVIDER
|
||||
|
||||
|
||||
!==============================================================================!
|
||||
! !
|
||||
! Read/write routines !
|
||||
|
@ -14,13 +14,6 @@ determinants:
|
||||
(done) determinants_bitmasks.irp.f
|
||||
(****) determinants{_complex}.irp.f
|
||||
mostly done
|
||||
could separate/combine some providers instead of copying
|
||||
for psi_{det,coef}_sorted:
|
||||
use same linked provider for psi_average_norm_contrib_sorted
|
||||
psi_det_sorted_order
|
||||
psi_det_sorted
|
||||
different providers for psi_coef{,_complex}_sorted
|
||||
need to figure out {,abs_}psi_coef_{min,max}
|
||||
need to modify ocaml for psi_coef_complex_qp_edit?
|
||||
save_wavefunction_specified? qp_edit save? (wrong for real?)
|
||||
(done) energy.irp.f
|
||||
|
Loading…
x
Reference in New Issue
Block a user