radis.db.classes module

Created on Tue Jul 18 16:15:03 2017.

@author: erwan

Summary

Define Molecule, Isotope and ElectronicState classes

ElectronicState has:

  • Molecular parameters (read from HITRAN molparams.txt)

  • Vibrational and rotational energies

Calculate Vibrational and Rotational energies for some database molecules

Molecules

Shortcut to some molecules ground states are defined at the end of the file in the dictionary Molecules, with the following structure:

{molecule_name: {isotope_number: {electronic_state_name: ElectronicState object}}}

Import with:

from radis.db.molecules import Molecules
CO2_X = Molecules['CO2'][1]['X']            # 1 for first isotope

Or:

from radis import getMolecule                # directly
CO2_2 = getMolecule('CO2', 1, 'X')         # better KeyError messages

Routine Listing


EXOMOL_ONLY_ISOTOPES_NAMES = {('AlCl', 1): '27Al-35Cl', ('AlCl', 2): '27Al-37Cl', ('AlF', 1): '27Al-19F', ('AlH', 1): '27Al-1H', ('AlH', 2): '27Al-2H', ('AlH', 3): '26Al-1H', ('AlO', 1): '27Al-16O', ('AlO', 2): '27Al-18O', ('AlO', 3): '27Al-17O', ('AlO', 4): '26Al-16O', ('AsH3', 1): '75As-1H3', ('BeH', 1): '9Be-1H', ('BeH', 2): '9Be-2H', ('BeH', 3): '9Be-3H', ('C2', 1): '12C2', ('C2', 2): '12C-13C', ('C2', 3): '13C2', ('CH', 1): '12C-1H', ('CH', 2): '13C-1H', ('CH3', 1): '12C-1H3', ('CH3F', 1): '12C-1H3-19F', ('CN', 1): '12C-14N', ('CN', 2): '13C-14N', ('CN', 3): '12C-15N', ('CN', 4): '13C-15N', ('CO', 7): '14C-16O', ('CO', 8): '14C-18O', ('CO', 9): '14C-17O', ('CO2', 13): '13C-17O2', ('CP', 1): '12C-31P', ('CS', 5): '13C-34S', ('CS', 6): '12C-36S', ('CS', 7): '13C-33S', ('CS', 8): '13C-36S', ('CaF', 1): '40Ca-19F', ('CaF', 2): '44Ca-19F', ('CaF', 3): '42Ca-19F', ('CaF', 4): '48Ca-19F', ('CaF', 5): '43Ca-19F', ('CaF', 6): '46Ca-19F', ('CaH', 1): '40Ca-1H', ('CaO', 1): '40Ca-16O', ('CrH', 1): '52Cr-1H', ('FeH', 1): '56Fe-1H', ('H2_p', 1): '1H-2H_p', ('H3O_p', 1): '1H3-16O_p', ('H3_p', 1): '1H3_p', ('H3_p', 2): '1H2-2H_p', ('HeH_p', 1): '4He-1H_p', ('HeH_p', 2): '4He-2H_p', ('HeH_p', 3): '3He-1H_p', ('HeH_p', 4): '3He-2H_p', ('KCl', 1): '39K-35Cl', ('KCl', 2): '39K-37Cl', ('KCl', 3): '41K-35Cl', ('KCl', 4): '41K-37Cl', ('KF', 1): '39K-19F', ('KF', 2): '41K-19F', ('KOH', 1): '39K-16O-1H', ('LiCl', 1): '7Li-35Cl', ('LiCl', 2): '7Li-37Cl', ('LiCl', 3): '6Li-35Cl', ('LiCl', 4): '6Li-37Cl', ('LiF', 1): '7Li-19F', ('LiF', 2): '6Li-19F', ('LiH', 1): '7Li-1H', ('LiH_p', 1): '7Li-1H_p', ('MgF', 1): '24Mg-19F', ('MgF', 2): '26Mg-19F', ('MgF', 3): '25Mg-19F', ('MgH', 1): '24Mg-1H', ('MgH', 2): '26Mg-1H', ('MgH', 3): '25Mg-1H', ('MgO', 1): '24Mg-16O', ('MgO', 2): '26Mg-16O', ('MgO', 3): '25Mg-16O', ('MgO', 4): '24Mg-18O', ('MgO', 5): '24Mg-17O', ('NH', 1): '14N-1H', ('NO', 4): '14N-17O', ('NO', 5): '15N-18O', ('NO', 6): '15N-17O', ('NS', 1): '14N-32S', ('NS', 2): '14N-34S', ('NS', 3): '14N-33S', ('NS', 4): '15N-32S', ('NS', 5): '14N-36S', ('NaCl', 1): '23Na-35Cl', ('NaCl', 2): '23Na-37Cl', ('NaF', 1): '23Na-19F', ('NaH', 1): '23Na-1H', ('NaH', 2): '23Na-2H', ('NaOH', 1): '23Na-16O-1H', ('NiH', 1): '58Ni-1H', ('NiH', 2): '60Ni-1H', ('NiH', 3): '62Ni-1H', ('OH_p', 1): '16O-1H_p', ('PF3', 1): '31P-19F3', ('PH', 1): '31P-1H', ('PN', 1): '31P-14N', ('PN', 2): '31P-15N', ('PO', 1): '31P-16O', ('PS', 1): '31P-32S', ('SH', 1): '32S-1H', ('SH', 2): '34S-1H', ('SH', 3): '33S-1H', ('SH', 4): '32S-2H', ('SH', 5): '36S-1H', ('ScH', 1): '45Sc-1H', ('SiH', 1): '28Si-1H', ('SiH', 2): '29Si-1H', ('SiH', 3): '30Si-1H', ('SiH', 4): '28Si-2H', ('SiH2', 1): '28Si-1H2', ('SiH4', 1): '28Si-1H4', ('SiO', 1): '28Si-16O', ('SiO', 2): '29Si-16O', ('SiO', 3): '30Si-16O', ('SiO', 4): '28Si-18O', ('SiO', 5): '28Si-17O', ('SiO2', 1): '28Si-16O2', ('SiS', 1): '28Si-32S', ('SiS', 2): '29Si-32S', ('SiS', 3): '28Si-34S', ('SiS', 4): '30Si-32S', ('SiS', 5): '28Si-33S', ('SiS', 6): '29Si-34S', ('SiS', 7): '30Si-34S', ('SiS', 8): '29Si-33S', ('SiS', 9): '30Si-33S', ('SiS', 10): '28Si-36S', ('SiS', 11): '29Si-36S', ('SiS', 12): '30Si-36S', ('TiH', 1): '48Ti-1H', ('TiO', 1): '48Ti-16O', ('TiO', 2): '46Ti-16O', ('TiO', 3): '47Ti-16O', ('TiO', 4): '49Ti-16O', ('TiO', 5): '50Ti-16O', ('VO', 1): '51V-16O', ('YO', 1): '89Y-16O', ('cis-P2H2', 1): 'cis-31P2-1H2', ('trans-P2H2', 1): 'trans-31P2-1H2', ('trans-P2H2', 2): 'trans-31P2-1H-2H'}[source]

All HITRAN_MOLECULES are also converted to their ExoMol full-name format in get_exomol_full_isotope_name()

class ElectronicState(molecule_name, isotope, state, term_symbol='', g_e=None, spectroscopic_constants='default', spectroscopic_constants_type='herzberg', Erovib=None, Ehaj=None, vmax=None, vmax_morse=None, Jmax=None, Ediss=None, **kwargs)[source]

Bases: Isotope

Define an electronic state of an Isotope of a Molecule

Parameters:
  • molecule_name (str, int) – molecule name, or HITRAN identifier

  • isotope (int) – isotope number of the molecule (sorted by abundance on Earth, HITRAN convention).

  • state (str) – Electronic state name

  • term_symbol (str) – Term symbol. Default ‘’

  • g_e (int) – Degeneracy. Default None

  • spectroscopic_constants (str, 'default', or dict) – filename of spectroscopic constants under Herzberg or Dunham format.

    Expected in the file:

    Yij: cm-1

    rovibrational coefficients in Dunham convention

    or

    wexe, Be, etc.cm-1

    rovibrational coefficients in Herzberg convention

    or

    Te: cm-1

    electronic energy. Default None if not given

    If default, the constants defined in spectroscopic constants are used.

    One can also directly give a dictionary directly:

    spectroscopic_constants = {'we':2300, 'wexe':20}
    
  • spectroscopic_constants_type ('herzberg', 'dunham') – convention for spectroscopic constants. Default 'herzberg'

  • Erovib (function) – Rovibrational energy of the molecule. Accessible with, typically, Mol.Erovib(v,J)

  • Ehaj (function) – To return vibrational energy in harmonic and anharmonic component, plus rotational energy. Used to build Treanor distributions

  • vmax, vmax_morse (int, or None) – maximum vibrational number (required for partition function calculation) to be calculated with Dunham expansion, and Morse potential If None, number will be inferred from dissociation energy

  • Jmax (int, or None) – maximum rotational number (required for partition function calculation) If None, number will be inferred from dissociation energy

  • Ediss (cm-1) – dissociation energy. Required for partition function calculation if neither vmax nor Jmax are given

  • kwargs (**dict) – forwarded to parent class

Examples

Examples using radis.db.classes.ElectronicState

Calculate Rovibrational Energies

Calculate Rovibrational Energies
Ehaj[source]

overwritten by Erovib if given, or by default Dunham developments if spectroscopic_constants are given

Type:

func

Erovib(v, J, remove_ZPE=True)[source]

Calculate rovibrational energy of molecule

\[E(v,J) = G(v) + F(v,J)\]

Works with Herzberg convention for the spectroscopic coefficients used in Gv(), Fv()

:Parameters: * **v** (*int*) -- vibrational state

For polyatomic molecules, use v1, v2, v3, etc. instead of v.

  • J (int) – rotational state

  • remove_ZPE (boolean) – if True, removes energy of v=0,J=0 vibrational level (zero-point-energy) Default True

Return type:

energy of state in cm-1

Notes

Method is overwritten on molecule creation for polyatomic molecules. Refer to the correct method below:

See also

Gv(), Fv()

get_Morse_inc()[source]

Get Morse potential energy increment correction for given molecule

Examples

inc = ElecState.get_Morse_inc()
Delta_E(vi, vi+1) = Delta_E0 - (vi+1-vi0)*inc

for the energy gap between vibrational level vi and vi+1, where vi0 is the last vibrational level calculated with Dunham expansion, and and Delta_E0 = DeltaE(vi0-1, vi0)

get_fullname()[source]
get_statename_utf()[source]

Returns Electronic state name in UTF format, used in the standard RADIS JSON databases. Examples:

'X', '1Σ+'
>>> X1SIG+

'C', '3Πu'
>>> C3PIu
HITRAN_CLASS1 = ['CO', 'HF', 'HCl', 'HBr', 'HI', 'N2', 'NO+'][source]

Diatomic molecules with ?

Type:

str

HITRAN_CLASS10 = ['CH4', 'CH3Cl', 'C2H6', 'HNO3', 'SF6', 'HCOOH', 'ClONO2', 'C2H4', 'CH3OH'][source]

Pentatomic or greater polyatomic

Type:

str

HITRAN_CLASS2 = ['O2'][source]

Diatomic molecules with different electronic levels

Type:

str

HITRAN_CLASS3 = ['NO', 'OH', 'ClO'][source]

Diatomic molecules with doublet-Pi electronic state

Type:

str

HITRAN_CLASS4 = ['N2O', 'OCS', 'HCN'][source]

Linear triatomic

Type:

str

HITRAN_CLASS5 = ['CO2'][source]

Linear triatomic with large Fermi resonance

Type:

str

HITRAN_CLASS6 = ['H2O', 'O3', 'SO2', 'NO2', 'HOCl', 'H2S', 'HO2', 'HOBr'][source]

Non-linear triatomic

Type:

str

HITRAN_CLASS7 = ['C2H2'][source]

Linear tetratomic

Type:

str

HITRAN_CLASS8 = ['NH3', 'PH3'][source]

Pyramidal tetratomic

Type:

str

HITRAN_CLASS9 = ['H2CO', 'H2O2', 'COF2'][source]

Non-linear tetratomic

Type:

str

HITRAN_GROUP1 = ['H2O', 'O3', 'SO2', 'NO2', 'HNO3', 'H2CO', 'HOCl', 'H2O2', 'COF2', 'H2S', 'HO2', 'HCOOH', 'ClONO2', 'HOBr', 'C2H4'][source]

asymmetric rotors

Type:

str

HITRAN_GROUP2 = ['CO2', 'N2O', 'CO', 'HF', 'HCl', 'HBr', 'HI', 'OCS', 'N2', 'HCN', 'C2H2', 'NO+'][source]

diatomic and linear molecules

Type:

str

HITRAN_GROUP3 = ['SF6', 'CH4'][source]

Spherical rotors

Type:

str

HITRAN_GROUP4 = ['CH3D', 'CH3Cl', 'C2H6', 'NH3', 'PH3', 'CH3OH'][source]

symmetric rotors

Type:

str

HITRAN_GROUP5 = ['O2'][source]

Triplet-Sigma ground electronic states

Type:

str

HITRAN_GROUP6 = ['NO', 'OH', 'ClO'][source]

Doublet-Pi ground electronic states

Type:

str

HITRAN_MOLECULES = ['H2O', 'CO2', 'O3', 'N2O', 'CO', 'CH4', 'O2', 'NO', 'SO2', 'NO2', 'NH3', 'HNO3', 'OH', 'HF', 'HCl', 'HBr', 'HI', 'ClO', 'OCS', 'H2CO', 'HOCl', 'N2', 'HCN', 'CH3Cl', 'H2O2', 'C2H2', 'C2H6', 'PH3', 'COF2', 'SF6', 'H2S', 'HCOOH', 'HO2', 'O', 'ClONO2', 'NO+', 'HOBr', 'C2H4', 'CH3OH', 'CH3Br', 'CH3CN', 'CF4', 'C4H2', 'HC3N', 'H2', 'CS', 'SO3', 'C2N2', 'COCl2', 'SO', 'CH3F', 'GeH4', 'CS2', 'CH3I', 'NF3'][source]

list of [HITRAN-2020] molecules.

Type:

str

class Isotope(molecule_name, isotope, isotope_name='', abundance=None, **kwargs)[source]

Bases: Molecule

Create an isotope of a given Molecule

Parameters:
  • molecule_name (str, or int) – molecule name or HITRAN identifier

  • isotope (int) – isotope identifier, sorted by decreasing abundance (cf HITRAN nomenclature)

Other Parameters:
  • isotope_name (str) – (optional) isotope name. Default ‘’

  • abundance (float) – isotopologue abundance. Default None

class Molecule(name, verbose=True)[source]

Bases: object

Define a new molecule

Parameters:

name (str, int) – molecule name, or HITRAN identifier

Other Parameters:

verbose (boolean) – more blabla

get_molecule(molecule_id)[source]

For a given input molecular identifier, return the corresponding HITRAN_MOLECULES name [1]_.

Parameters:

molecular_id (str) – Hitran identifier of the molecule.

References

get_molecule_identifier(molecule_name)[source]

For a given input molecular formula, return the corresponding HITRAN_MOLECULES identifier number [1]_.

Parameters:

molecular_formula (str) – The string describing the molecule.

Returns:

M – The HITRAN molecular identified number.

Return type:

int

References

Function is from https://github.com/nzhagen/hitran/blob/master/hitran.py