Calculates the reciprical lattice vectors and the cell volume
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | real_lat(3,3) | |||
| real(kind=dp), | intent(out) | :: | recip_lat(3,3) | |||
| real(kind=dp), | intent(out) | :: | volume |
subroutine utility_recip_lattice_base(real_lat, recip_lat, volume) !================================================! ! !! Calculates the reciprical lattice vectors and the cell volume ! !================================================ use w90_constants, only: dp, twopi, eps5 implicit none real(kind=dp), intent(in) :: real_lat(3, 3) real(kind=dp), intent(out) :: recip_lat(3, 3) real(kind=dp), intent(out) :: volume call utility_inv3(real_lat, recip_lat, volume) if (abs(volume) > eps5) then recip_lat = twopi*recip_lat/volume volume = abs(volume) end if return end subroutine utility_recip_lattice_base