:py:mod:`exo_k.util.molar_mass` =============================== .. py:module:: exo_k.util.molar_mass .. autoapi-nested-parse:: @author: jeremy leconte Module Contents --------------- .. py:class:: Molar_mass Bases: :py:obj:`exo_k.util.singleton.Singleton` A class to compute the molar mass (in kg/mol) of regular molecules with a name written in a regular way (e.g. CO2, H2O, etc.). This class can also store the molar mass of custom gases with arbitrary names (for example: My_gas, earth_background). .. py:method:: init(*args, **kwds) Initializes empty dictionary of custom molecular masses. .. py:method:: add_species(species_dict) Add one or several species weights to the database. :param species_dict: Keys are gases names (they do not have to be real molecules). Values are molar masses in kg/mol. :type species_dict: :class:`dict` .. py:method:: fetch(molecule_name) Computes the molar mass of a molecule in kg/mol :param molecule_name: str Name of the molecule. :returns: Molar mass in kg/mol. :rtype: float .. py:data:: _atomic_mass_in_amu .. py:data:: _molar_mass_atoms