get_geometric_counterpoise_hessian Subroutine

public subroutine get_geometric_counterpoise_hessian(mol, param, cutoff, hessian, partition)

Analytical second derivatives of the geometric counterpoise correction with respect to the Cartesian coordinates

Arguments

Type IntentOptional Attributes Name
class(structure_type), intent(in) :: mol

Molecular structure data

type(gcp_param), intent(in) :: param

Geometric counterpoise parameters

type(realspace_cutoff), intent(in) :: cutoff

Realspace cutoffs

real(kind=wp), intent(out), contiguous :: hessian(:,:)

Counter-poise hessian

type(work_partition), intent(in), optional :: partition

Work partition of the atom pairs, absent selects the complete work


Source Code

subroutine get_geometric_counterpoise_hessian(mol, param, cutoff, hessian, partition)

   !> Molecular structure data
   class(structure_type), intent(in) :: mol

   !> Geometric counterpoise parameters
   type(gcp_param), intent(in) :: param

   !> Realspace cutoffs
   type(realspace_cutoff), intent(in) :: cutoff

   !> Counter-poise hessian
   real(wp), intent(out), contiguous :: hessian(:, :)

   !> Work partition of the atom pairs, absent selects the complete work
   type(work_partition), intent(in), optional :: partition

   real(wp), allocatable :: lattr(:, :)

   hessian(:, :) = 0.0_wp

   if (allocated(param%emiss) .and. allocated(param%slater) .and. allocated(param%xv)) then
      call get_lattice_points(mol%periodic, mol%lattice, cutoff%gcp, lattr)
      call gcp_hessian(mol, lattr, cutoff%gcp, param%zeff, param%emiss, param%slater, &
         & param%xv, param%rvdw, param%sigma, param%alpha, param%beta, param%damp, &
         & param%dmp_scal, param%dmp_exp, hessian, partition)
   end if

   if (param%srb .or. param%base) then
      call get_lattice_points(mol%periodic, mol%lattice, cutoff%srb, lattr)
   end if

   if (param%srb) then
      call srb_hessian(mol, lattr, cutoff%srb, mol%num, param%rvdw_srb, param%rscal, &
         & param%qscal, rexp_srb, zexp_srb, hessian, partition)
   end if

   if (param%base) then
      call srb_hessian(mol, lattr, cutoff%srb, param%zeff, param%rvdw, param%rscal, &
         & param%qscal, rexp_base, zexp_base, hessian, partition)
   end if
end subroutine get_geometric_counterpoise_hessian