ascii_system_properties Subroutine

public subroutine ascii_system_properties(unit, mol, disp, cn, q, c6)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: unit

Unit for output

class(structure_type), intent(in) :: mol

Molecular structure data

class(dispersion_model), intent(in) :: disp

Dispersion model

real(kind=wp), intent(in) :: cn(:)

Coordination numbers

real(kind=wp), intent(in) :: q(:)

Atomic partial charges

real(kind=wp), intent(in) :: c6(:,:)

Atomic dispersion coefficients


Source Code

subroutine ascii_system_properties(unit, mol, disp, cn, q, c6)
   !DEC$ ATTRIBUTES DLLEXPORT :: ascii_system_properties

   !> Unit for output
   integer, intent(in) :: unit

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

   !> Dispersion model
   class(dispersion_model), intent(in) :: disp

   !> Coordination numbers
   real(wp), intent(in) :: cn(:)

   !> Atomic partial charges
   real(wp), intent(in) :: q(:)

   !> Atomic dispersion coefficients
   real(wp), intent(in) :: c6(:, :)

   integer :: iat, isp, jat
   real(wp) :: sum_c8

   sum_c8 = 0.0_wp
   write(unit, '(a,":")') "Atomic properties (in atomic units)"
   write(unit, '(61("-"))')
   write(unit, '(a6,1x,a4,5x,*(1x,a10))') "#", "Z", "CN", "q", "C6(AA)", "C8(AA)"
   write(unit, '(61("-"))')
   do iat = 1, mol%nat
      isp = mol%id(iat)
      write(unit, '(i6,1x,i4,1x,a4,*(1x,f10.4))') &
         & iat, mol%num(isp), mol%sym(isp), cn(iat), q(iat), c6(iat, iat), &
         & c6(iat, iat)*3*disp%r4r2(isp)**2
      do jat = 1, mol%nat
         sum_c8 = sum_c8 + 3*c6(jat, iat)*disp%r4r2(mol%id(jat))*disp%r4r2(isp)
      end do
   end do
   write(unit, '(61("-"))')
   write(unit, '(a)')

   write(unit, '(a,":")') "Molecular properties (in atomic units)"
   write(unit, '(40("-"))')
   write(unit, '(1x, a, t20, f19.4)') &
      "molecular C6",  sum(c6), &
      "molecular C8",  sum_c8
   write(unit, '(40("-"))')
   write(unit, '(a)')

end subroutine ascii_system_properties