10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-27 06:43:48 +01:00
quantum_package/plugins/dress_zmq/dressing_vector.irp.f

33 lines
884 B
Fortran
Raw Normal View History

2018-02-20 15:51:53 +01:00
BEGIN_PROVIDER [ double precision, dressing_column_h, (N_det,N_states) ]
&BEGIN_PROVIDER [ double precision, dressing_column_s, (N_det,N_states) ]
implicit none
BEGIN_DOC
! Null dressing vectors
END_DOC
2018-03-05 17:04:26 +01:00
integer :: i,ii,k,j, l
double precision :: f, tmp
double precision, external :: u_dot_v
2018-02-19 17:15:59 +01:00
2018-03-05 17:04:26 +01:00
dressing_column_h(:,:) = 0.d0
dressing_column_s(:,:) = 0.d0
do k=1,N_states
l = dressed_column_idx(k)
f = 1.d0/psi_coef(l,k)
2018-03-05 17:04:26 +01:00
do j = 1, n_det
dressing_column_h(j,k) = delta_ij(k,j,1) * f
dressing_column_s(j,k) = delta_ij(k,j,2) * f
enddo
2018-03-05 17:04:26 +01:00
tmp = u_dot_v(dressing_column_h(1,k), psi_coef(1,k), N_det) &
- dressing_column_h(l,k) * psi_coef(l,k)
dressing_column_h(l,k) -= tmp * f
2018-03-05 17:04:26 +01:00
tmp = u_dot_v(dressing_column_s(1,k), psi_coef(1,k), N_det) &
- dressing_column_s(l,k) * psi_coef(l,k)
dressing_column_s(l,k) -= tmp * f
enddo
2018-03-05 17:04:26 +01:00
END_PROVIDER