Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(basis_set), | intent(in) | :: | basis | |||
real(kind=real64), | intent(in), | contiguous | :: | coord(:,:) | ||
real(kind=real64), | intent(inout), | contiguous | :: | hcore(:) |
subroutine add_ecpint(basis, coord, hcore) real(real64), contiguous, intent(in) :: coord(:,:) type(basis_set), intent(in) :: basis real(real64), contiguous, intent(inout) :: hcore(:) type(c_ptr) :: integrator type(ecp_result) :: result_ptr real(c_double), pointer :: libecp_res(:) integer :: i, j, c integer(c_int) :: driv_order if (.not.(basis%ecp_params%is_ecp)) then return end if driv_order = 0 call set_integrator(integrator, basis, coord, driv_order) result_ptr = compute_integrals(integrator) call c_f_pointer(result_ptr%data, libecp_res, [result_ptr%size]) call transform_matrix(basis, libecp_res) c = 0 do i = 1, basis%nbf do j = 1, i c = c + 1 hcore(c) = libecp_res((i - 1) * basis%nbf + j) + hcore(c) end do end do result_ptr%data = c_null_ptr result_ptr%size = 0 nullify(libecp_res) call free_integrator(integrator) call free_result(result_ptr) end subroutine add_ecpint