calculate_dedr Subroutine

public subroutine calculate_dedr(ret, p, a, g, b, f, jnuc_want, nwant, ds_out, dh_out, djh_out, dvxc_out, ja_out, yes_printout, read_veed, yes_fockexchange)

Uses


calculate_dEdR : MAIN routine Jnuc_want(Nwant) : iNuc indices of your need ret(3,Nwant) : contains dE/dR vectors


-- Constants -- we want N upto where we have to sum over

-- Options -- --Check Input --

Just a reminder ... write(0,)"#calculate_dEdR: Switch to Slater..."; V_eff = potential_J_beta( P, G, A, rho) !! <12/02:Use_Fstructure> V_eff(:) = - Vex_factor * rho(:)(ONE/THREE) !! (THREE/PI)(ONE/THREE) !! -- Sep.11 fix -- !! - TWO \sum_{i} f_{i} S_{ii} e_{i} = -\sum_{i} (nOcc_{i}e_{i}) S_{ii} <12/02:Use_Fstructure> deallocate(V_eff) 27/11/2014:fix use f_occ if THERMAL !! --Sep.11 fix do k=1,3; parts(k,jwant,4)=-TWOcontract_S3(F%LC,dOdR(:,:,k),F%CE,wks_Nb,Nbasis);end do contract_S3(F%LC,dOdR(:,:,k),E_occ,wks_Nb,Nbasis); if(present(non_interacting_part) .and. non_interacting_part/=0 )then ret(k,jwant)= parts(k,jwant,1) + parts(k,jwant,4) + parts(k,jwant,5) end if if(present(non_interacting_part) .and. non_interacting_part/=0 )then write(,*)"#Energy Derivatives:!WWW non-interacting part" else end if <12/02:Use_Fstructure> deallocate(rho, Dmat, dfdR, dOdR, dOdR_0, wks_Nb, E_occ)

Arguments

Type IntentOptional Attributes Name
real(kind=long), dimension(3, nwant) :: ret
type(param), intent(in) :: p
type(atom_set), intent(in) :: a(:)
type(grid3d), intent(in) :: g
type(basis), intent(in) :: b
type(wf_data), intent(inout) :: f
integer, dimension(nwant) :: jnuc_want
integer, intent(in) :: nwant
real(kind=long), intent(out), optional :: ds_out(b%n_basis*(b%n_basis+1)/2)
real(kind=long), intent(out), optional :: dh_out(b%n_basis*(b%n_basis+1)/2)
real(kind=long), intent(out), optional :: djh_out(b%n_basis*(b%n_basis+1)/2)
real(kind=long), intent(out), optional :: dvxc_out(b%n_basis*(b%n_basis+1)/2)
integer, optional :: ja_out(2)
logical, intent(in), optional :: yes_printout
logical, optional :: read_veed
logical, optional :: yes_fockexchange