molecules
index
../src3/molecules.py

molecules
 
A module essentially defining/collecting molecular data (mass, ...)
and the ID numbers used by spectroscopic data bases (Hitran, Geisa, ...)
 
Usage as a command line script:
 
  molecules [options] [species]
 
  without argument:         list known molecules along with 'main' data
  with molecular name(s):   list all attributes of this molecule(s)
  with option -s:           -sh  sort according to hitran id number
                            -sg  sort according to geisa  id number
                            -sm  sort according to molecular mass
                            -sn  sort according to molecular name
 
A dictionary of dictionaries containing molecular data along with some convenience functions.
 
NOTE:  HDO  is considered as an individual molecule in GEISA2015
       CH3D is separate from CH4 in GEISA 2008 ff

 
Functions
       
get_mol_id_nr(gases, database='hitran')
Build up a dictionary with molecular numbers (data base specific!) as keys and molecular names as values.
get_molec_data(molecule)
Given a dictionary of dictionaries with molecular data (name and attributes), return dictionary of selected molecule.
isotope_id(Mol, Iso, databasetype='hitran')
name_sort_molecules(gases)
Given a dictionary of dictionaries with molecular data (name and further attributes), sort by molecular name.
numeric_sort_molecules(gases, criterion='hitran')
Given a dictionary of dictionaries with molecular data (name, ID numbers, mass, ...), sort numerically.

 
Data
        mainMolecules = ['H2O', 'CO2', 'O3', 'N2O', 'CH4', 'CO', 'O2']
molecules = {'BrO': {'NumDeg': [1], 'TempExpGL': 0.5, 'TempExpQR': 1.0, 'VibFreq': [500.0], 'isotopes': ['69', '61'], 'mass': 95.0}, 'C2H2': {'NumDeg': [1, 1, 1, 2, 2], 'TempExpGL': 0.75, 'TempExpQR': 1.0, 'VibFreq': [3374.0, 1974.0, 3289.0, 629.0, 730.0], 'geisa': 24, 'hitran': 26, 'isotopes': ['1221', '1231', '1222'], 'mass': 26.03, 'sao': 26}, 'C2H4': {'NumDeg': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 'TempExpGL': 0.5, 'TempExpQR': 1.5, 'VibFreq': [3026, 1625, 1342, 1023, 3103, 1236, 949, 943, 3106, 826, 2989, 1444], 'geisa': 25, 'hitran': 38, 'isotopes': ['221', '311'], 'mass': 28.0}, 'C2H6': {'NumDeg': [1, 1, 1, 1, 1, 1, 2, 1, 2], 'TempExpGL': 0.75, 'TempExpQR': 1.9, 'VibFreq': [2899.0, 1375.0, 993.0, 275.0, 2954.0, 1379.0, 2994.0, 1486.0, 822.0], 'geisa': 22, 'hitran': 27, 'isotopes': ['1221', '1231'], 'mass': 30.07, 'sao': 27}, 'C2HD': {'geisa': 48, 'isotopes': ['122'], 'mass': 17.0}, 'C2N2': {'VibFreq': [2330, 846, 2158, 503, 234], 'geisa': 29, 'hitran': 48, 'isotopes': ['4224'], 'mass': 52.0}, 'C3H4': {'geisa': 40, 'mass': 40.0}, 'C3H8': {'VibFreq': [2977, 2962, 2887, 1476, 1462, 1392, 1158, 869, 369, 2967, 1451, 1278, 940, 216, 2968, 2887, 1464, 1378, 1338, 1054, ...], 'geisa': 28, 'isotopes': ['221'], 'mass': 44.0}, 'C4H2': {'VibFreq': [3293, 2184, 874, 3329, 2020, 627, 482, 630, 231], 'geisa': 30, 'hitran': 43, 'isotopes': ['221'], 'mass': 50.0}, 'C6H6': {'VibFreq': [3062, 992, 1326, 673, 3068, 1010, 995, 703, 1310, 1150, 849, 3063, 1486, 1038, 3047, 1596, 1178, 606, 975, 410], 'geisa': 47, 'isotopes': ['266'], 'mass': 78.0}, ...}