Add the second derivative of the D4 coordination number contracted with the derivative of the energy w.r.t. the coordination number.
| Type | Intent | Optional | 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(in) | :: | dEdcn(:) |
Derivative of expression with respect to the coordination number |
||
| real(kind=wp), | intent(inout) | :: | hessian(:,:) |
Second derivative of the energy w.r.t. the Cartesian coordinates |
||
| type(error_type), | intent(out), | optional, | allocatable | :: | error |
Error on failure; results are NaN if initialization fails. |
subroutine add_coordination_number_hessian(mol, trans, cutoff, rcov, en, dEdcn, hessian, error) !> 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(:) !> Derivative of expression with respect to the coordination number real(wp), intent(in) :: dEdcn(:) !> Second derivative of the energy w.r.t. the Cartesian coordinates real(wp), intent(inout) :: hessian(:, :) !> Error on failure; results are NaN if initialization fails. type(error_type), allocatable, intent(out), optional :: error class(ncoord_type), allocatable :: ncoord type(error_type), allocatable :: local_error call new_ncoord(ncoord, mol, cn_count%dftd4, & & kcn=default_kcn, cutoff=cutoff, rcov=rcov, en=en, error=local_error) if (allocated(local_error)) then hessian = ieee_value(0.0_wp, ieee_quiet_nan) if (present(error)) call move_alloc(local_error, error) return end if call ncoord%add_coordination_number_hessian(mol, trans, dEdcn, hessian) end subroutine add_coordination_number_hessian