Logic exercise to distribute a triple energy to atomwise energies.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ii |
Atom indices |
||
integer, | intent(in) | :: | jj |
Atom indices |
||
integer, | intent(in) | :: | kk |
Atom indices |
Fraction of energy
elemental function triple_scale(ii, jj, kk) result(triple) !> Atom indices integer, intent(in) :: ii, jj, kk !> Fraction of energy real(wp) :: triple if (ii == jj) then if (ii == kk) then ! ii'i" -> 1/6 triple = 1.0_wp/6.0_wp else ! ii'j -> 1/2 triple = 0.5_wp end if else if (ii /= kk .and. jj /= kk) then ! ijk -> 1 (full) triple = 1.0_wp else ! ijj' and iji' -> 1/2 triple = 0.5_wp end if end if end function triple_scale