1! This file is part of xtb. 2! 3! Copyright (C) 2017-2020 Stefan Grimme 4! 5! xtb is free software: you can redistribute it and/or modify it under 6! the terms of the GNU Lesser General Public License as published by 7! the Free Software Foundation, either version 3 of the License, or 8! (at your option) any later version. 9! 10! xtb is distributed in the hope that it will be useful, 11! but WITHOUT ANY WARRANTY; without even the implied warranty of 12! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13! GNU Lesser General Public License for more details. 14! 15! You should have received a copy of the GNU Lesser General Public License 16! along with xtb. If not, see <https://www.gnu.org/licenses/>. 17 18module xtb_mctc_convert 19 use xtb_mctc_accuracy, only : wp 20 use xtb_mctc_constants 21 implicit none 22 private 23! convert bohr (a.u.) to Ångström and back 24 real(wp),public,parameter :: autoaa = 0.52917726_wp 25 real(wp),public,parameter :: aatoau = 1.0_wp/autoaa 26! convert Hartree to eV and back 27 real(wp),public,parameter :: autoev = 27.21138505_wp 28 real(wp),public,parameter :: evtoau = 1.0_wp/autoev 29! convert Hartree to kcal/mol and back 30 real(wp),public,parameter :: autokcal = 627.50947428_wp 31 real(wp),public,parameter :: kcaltoau = 1.0_wp/autokcal 32! convert Hartree to kJ/mol and back 33 real(wp),public,parameter :: autokj = 2625.49964038_wp 34 real(wp),public,parameter :: kjtoau = 1.0_wp/autokj 35! convert Hartree to reciproce centimeters/wavenumbers and back 36 real(wp),public,parameter :: autorcm = 219474.63067_wp 37 real(wp),public,parameter :: autowav = autorcm 38 real(wp),public,parameter :: rcmtoau = 1.0_wp/autorcm 39 real(wp),public,parameter :: wavtoau = 1.0_wp/autowav 40! convert Hartree to nanometers and back 41 real(wp),public,parameter :: autonm = 45.56335266_wp 42 real(wp),public,parameter :: nmtoau = 1.0_wp/autonm 43! masses 44! amu -> kg :: conversion from atomic mass units to kg 45! me -> kg :: electron mass (a.u.) in kg 46! amu -> au :: conversion from a.u. to amu 47 real(wp),public,parameter :: amutokg = 1.660539040e-27_wp 48 real(wp),public,parameter :: kgtoamu = 1.0_wp/amutokg 49 real(wp),public,parameter :: metokg = 9.10938356e-31_wp 50 real(wp),public,parameter :: kgtome = 1.0_wp/metokg 51 real(wp),public,parameter :: amutoau = amutokg*kgtome 52 real(wp),public,parameter :: autoamu = kgtoamu*metokg 53! femtosectons to atomic time units 54 real(wp),public,parameter :: fstoau = 41.3413733365614_wp 55 real(wp),public,parameter :: autofs = 1.0_wp/fstoau 56! Coulomb to atomic charge units (electrons) 57 real(wp),public,parameter :: autoc = 1.6021766208e-19_wp 58 real(wp),public,parameter :: ctoau = 1.0_wp/autoc 59! Debye to atomic units 60 real(wp),public,parameter :: autod = autoc * lightspeed * autoaa**2 * fstoau * 1.0e+16_wp 61 real(wp),public,parameter :: dtoau = 1.0_wp/autod 62! Dipole derivatives along mass-weighted normal mode coordinates (a.u.) to km/mol (IR int.) 63 real(wp),public,parameter :: autokmmol = 1.7770969e+6_wp 64end module xtb_mctc_convert 65