mctc_ncoord Module

Coordination number evaluation module.

This module provides various coordination number counting functions for molecular structures. Coordination numbers are computed based on interatomic distances and covalent radii using different counting functions.

Available counting functions (via cn_count enumerator):

  • cn_count%exp: Exponential counting function
  • cn_count%dexp: Double-exponential counting function
  • cn_count%erf: Error-function-based counting function
  • cn_count%erf_en: Electronegativity-weighted error function
  • cn_count%dftd4: DFT-D4 error-function-based counting function

Use new_ncoord to create a coordination number evaluator, then call the get_cn method to compute coordination numbers for a structure.

Example usage:

 use mctc_ncoord
 use mctc_io, only : structure_type
 use mctc_env, only : wp, error_type
 class(ncoord_type), allocatable :: ncoord
 type(structure_type) :: mol
 type(error_type), allocatable :: error
 real(wp), allocatable :: cn(:)

 call new_ncoord(ncoord, mol, cn_count%exp, error)
 allocate(cn(mol%nat))
 call ncoord%get_cn(mol, cn)


Variables

Type Visibility Attributes Name Initial
type(enum_cn_count), public, parameter :: cn_count = enum_cn_count()

Actual enumerator possible coordination numbers

Enumerator Description Typical Use
cn_count%exp Exponential counting function General purpose
cn_count%dexp Double-exponential counting function Sharper cutoff
cn_count%erf Error-function-based counting GFN methods
cn_count%erf_en Electronegativity-weighted error function EN corrections
cn_count%dftd4 DFT-D4 error-function-based counting Dispersion corrections

Functions

public pure function get_cn_count_id(cn_count_name) result(cn_count_id)

Translate string into coordination number type

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: cn_count_name

String for coordination number counting function

Return Value integer

ID for coordination number counting function

public pure function get_cn_count_string(cn_count_id) result(cn_count_name)

Translate string into coordination number type

Arguments

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

ID for coordination number counting function

Return Value character(len=:), allocatable

String for coordination number counting function


Subroutines

public subroutine new_ncoord(self, mol, cn_count_type, error, kcn, cutoff, rcov, en, cut, norm_exp)

Create a new generic coordination number container

Arguments

Type IntentOptional Attributes Name
class(ncoord_type), intent(out), allocatable :: self

Instance of the coordination number container

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

Molecular structure data

integer, intent(in) :: cn_count_type

Coordination number type

type(error_type), intent(out), allocatable :: error

Error handling

real(kind=wp), intent(in), optional :: kcn

Optional steepness of counting function

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

Optional real space cutoff

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

Optional set of covalent radii to be used in CN

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

Optional set of electronegativities to be used in CN

real(kind=wp), intent(in), optional :: cut

Optional cutoff for the maximum coordination number

real(kind=wp), intent(in), optional :: norm_exp

Optional exponent of the distance normalization