Calculate pairwise representation of dispersion energy
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | verror | |||
| type(c_ptr), | value | :: | vmol | |||
| type(c_ptr), | value | :: | vdisp | |||
| type(c_ptr), | value | :: | vparam | |||
| type(c_ptr), | intent(in), | value | :: | c_pair_energy2 | ||
| type(c_ptr), | intent(in), | value | :: | c_pair_energy3 |
subroutine get_pairwise_dispersion_api(verror, vmol, vdisp, vparam, & & c_pair_energy2, c_pair_energy3) & & bind(C, name=namespace//"get_pairwise_dispersion") type(c_ptr), value :: verror type(vp_error), pointer :: error type(c_ptr), value :: vmol type(vp_structure), pointer :: mol type(c_ptr), value :: vdisp type(vp_model), pointer :: disp type(c_ptr), value :: vparam type(vp_param), pointer :: param type(c_ptr), value, intent(in) :: c_pair_energy2 real(wp), pointer :: pair_energy2(:, :) type(c_ptr), value, intent(in) :: c_pair_energy3 real(wp), pointer :: pair_energy3(:, :) type(realspace_cutoff) :: cutoff if (.not.c_associated(verror)) return call c_f_pointer(verror, error) if (.not.c_associated(vmol)) then call fatal_error(error%ptr, "Molecular structure data is missing") return end if call c_f_pointer(vmol, mol) if (.not.c_associated(vdisp)) then call fatal_error(error%ptr, "Dispersion model is missing") return end if call c_f_pointer(vdisp, disp) if (.not.c_associated(vparam)) then call fatal_error(error%ptr, "Damping parameters are missing") return end if call c_f_pointer(vparam, param) if (.not.allocated(param%ptr)) then call fatal_error(error%ptr, "Damping parameters are not initialized") return end if call c_f_pointer(c_pair_energy2, pair_energy2, [mol%ptr%nat, mol%ptr%nat]) call c_f_pointer(c_pair_energy3, pair_energy3, [mol%ptr%nat, mol%ptr%nat]) cutoff = realspace_cutoff() if (allocated(disp%cutoff)) then cutoff = disp%cutoff end if call get_pairwise_dispersion(error%ptr, mol%ptr, disp%ptr, param%ptr, cutoff, & & pair_energy2, pair_energy3) end subroutine get_pairwise_dispersion_api