Create a new generic coordination number container
Type | Intent | Optional | 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 |
subroutine new_ncoord(self, mol, cn_count_type, error, kcn, cutoff, rcov, en, cut, norm_exp) !> Instance of the coordination number container class(ncoord_type), allocatable, intent(out) :: self !> Molecular structure data type(structure_type), intent(in) :: mol !> Coordination number type integer, intent(in) :: cn_count_type !> Error handling type(error_type), allocatable, intent(out) :: error !> Optional steepness of counting function real(wp), intent(in), optional :: kcn !> Optional real space cutoff real(wp), intent(in), optional :: cutoff !> Optional set of covalent radii to be used in CN real(wp), intent(in), optional :: rcov(:) !> Optional set of electronegativities to be used in CN real(wp), intent(in), optional :: en(:) !> Optional cutoff for the maximum coordination number real(wp), intent(in), optional :: cut !> Optional exponent of the distance normalization real(wp), intent(in), optional :: norm_exp select case(cn_count_type) case default call fatal_error(error, "Unsupported option for coordination number") return case(cn_count%exp) block type(exp_ncoord_type), allocatable :: tmp allocate(tmp) call new_exp_ncoord(tmp, mol, kcn=kcn, cutoff=cutoff, rcov=rcov, cut=cut) call move_alloc(tmp, self) end block case(cn_count%dexp) block type(dexp_ncoord_type), allocatable :: tmp allocate(tmp) call new_dexp_ncoord(tmp, mol, cutoff=cutoff, rcov=rcov, cut=cut) call move_alloc(tmp, self) end block case(cn_count%erf) block type(erf_ncoord_type), allocatable :: tmp allocate(tmp) call new_erf_ncoord(tmp, mol, kcn=kcn, cutoff=cutoff, & & rcov=rcov, cut=cut, norm_exp=norm_exp) call move_alloc(tmp, self) end block case(cn_count%erf_en) block type(erf_en_ncoord_type), allocatable :: tmp allocate(tmp) call new_erf_en_ncoord(tmp, mol, kcn=kcn, cutoff=cutoff, & & rcov=rcov, en=en, cut=cut, norm_exp=norm_exp) call move_alloc(tmp, self) end block case(cn_count%dftd4) block type(erf_dftd4_ncoord_type), allocatable :: tmp allocate(tmp) call new_erf_dftd4_ncoord(tmp, mol, kcn=kcn, cutoff=cutoff, & & rcov=rcov, en=en, cut=cut, norm_exp=norm_exp) call move_alloc(tmp, self) end block end select end subroutine new_ncoord