get_coordination_number Subroutine

public subroutine get_coordination_number(mol, trans, cutoff, rcov, en, cn, dcndr, dcndL)

Geometric fractional coordination number, supports error function counting.

Arguments

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

Molecular structure data

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

Lattice points

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

Real space cutoff

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

Covalent radius

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

Electronegativity

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

Error function coordination number.

real(kind=wp), intent(out), optional :: dcndr(:,:,:)

Derivative of the CN with respect to the Cartesian coordinates.

real(kind=wp), intent(out), optional :: dcndL(:,:,:)

Derivative of the CN with respect to strain deformations.


Source Code

subroutine get_coordination_number(mol, trans, cutoff, rcov, en, cn, dcndr, dcndL)
   !DEC$ ATTRIBUTES DLLEXPORT :: get_coordination_number

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

   !> Lattice points
   real(wp), intent(in) :: trans(:, :)

   !> Real space cutoff
   real(wp), intent(in) :: cutoff

   !> Covalent radius
   real(wp), intent(in) :: rcov(:)

   !> Electronegativity
   real(wp), intent(in) :: en(:)

   !> Error function coordination number.
   real(wp), intent(out) :: cn(:)

   !> Derivative of the CN with respect to the Cartesian coordinates.
   real(wp), intent(out), optional :: dcndr(:, :, :)

   !> Derivative of the CN with respect to strain deformations.
   real(wp), intent(out), optional :: dcndL(:, :, :)

   if (present(dcndr) .and. present(dcndL)) then
      call ncoord_derf(mol, trans, cutoff, rcov, en, cn, dcndr, dcndL)
   else
      call ncoord_erf(mol, trans, cutoff, rcov, en, cn)
   end if

end subroutine get_coordination_number