Convert moments of inertia to rotational constants in GHz.
B = h / (8 * pi^2 * I) where I is in SI units. For I in amu*Angstrom^2: B(GHz) = 505379.07 / I
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | moments(3) |
Moments in amu*Angstrom^2 |
||
| logical, | intent(in) | :: | is_linear |
True if linear molecule |
||
| real(kind=dp), | intent(out) | :: | rot_const(3) |
Rotational constants in GHz |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | i |
pure subroutine compute_rotational_constants(moments, is_linear, rot_const) !! Convert moments of inertia to rotational constants in GHz. !! !! B = h / (8 * pi^2 * I) where I is in SI units. !! For I in amu*Angstrom^2: B(GHz) = 505379.07 / I real(dp), intent(in) :: moments(3) !! Moments in amu*Angstrom^2 logical, intent(in) :: is_linear !! True if linear molecule real(dp), intent(out) :: rot_const(3) !! Rotational constants in GHz integer :: i rot_const = 0.0_dp if (is_linear) then ! For linear molecules, only one rotational constant matters ! Use the largest moment (moments are sorted ascending) if (moments(3) > LINEAR_THRESHOLD) then rot_const(1) = ROTCONST_AMUA2_TO_GHZ/moments(3) end if else ! For nonlinear molecules, compute all three do i = 1, 3 if (moments(i) > LINEAR_THRESHOLD) then rot_const(i) = ROTCONST_AMUA2_TO_GHZ/moments(i) end if end do end if end subroutine compute_rotational_constants