@brief Normalize V1
and V2
by biorthogonality condition
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(out), | dimension(:,:) | :: | vr | ||
real(kind=dp), | intent(out), | dimension(:,:) | :: | vl | ||
logical, | intent(in) | :: | tamm_dancoff |
subroutine rpavnorm(vr,vl,tamm_dancoff) use precision, only: dp implicit none real(kind=dp), intent(out), dimension(:,:) :: vr, vl logical, intent(in) :: tamm_dancoff real(kind=dp) :: scal, vrl, vrr integer :: ivec, nvec nvec = ubound(vl, 2) if (tamm_dancoff) then do ivec = 1, nvec vrr = dot_product(vr(:,ivec),vr(:,ivec)) scal = sqrt(1.0_dp/vrr) vr(:,ivec) = vr(:,ivec)*scal end do else do ivec = 1, nvec vrl = dot_product(vr(:,ivec),vl(1:nvec,ivec)) scal = sqrt(1.0D+00/vrl) vr(:,ivec)=vr(:,ivec)*scal vl(:,ivec)=vl(:,ivec)*scal end do end if end subroutine rpavnorm