petitRADTRANS.chemistry.prt_molmass
===================================

.. py:module:: petitRADTRANS.chemistry.prt_molmass

.. autoapi-nested-parse::

   Interface between molmass and petitRADTRANS.



Functions
---------

.. autoapisummary::

   petitRADTRANS.chemistry.prt_molmass.element_number2element_symbol
   petitRADTRANS.chemistry.prt_molmass.element_symbol2element_number
   petitRADTRANS.chemistry.prt_molmass.get_molmass_name
   petitRADTRANS.chemistry.prt_molmass.get_species_elements
   petitRADTRANS.chemistry.prt_molmass.get_species_molar_mass


Module Contents
---------------

.. py:function:: element_number2element_symbol(atomic_number: int) -> str

   Convert an element's atomic number (e.g. 6) to its element symbol (e.g. 'C').


.. py:function:: element_symbol2element_number(symbol: str) -> int

   Convert an element symbol (e.g. 'C') to its atomic number (e.g. 6).


.. py:function:: get_molmass_name(species: str)

   Convert a pRT species' name into a molmass-compatible name.


.. py:function:: get_species_elements(species: str) -> dict[str, int]

   Decompose a species into its elements and their amount.

   Example:
       >>> get_species_elements('H2O')
       >>> {'H': 2, 'O': 1}

   Args:
       species: pRT chemical formula of the species

   Returns:
       A dictionary containing the element symbols of the species as keys and their amount as values.


.. py:function:: get_species_molar_mass(species: str) -> float

   Get the molecular mass of a given species.

   This function uses the molmass package to calculate the mass number for the standard isotope of an input species.
   If all_iso is part of the input, it will return the mean molar mass.

   Args:
       species : string
           The chemical formula of the compound. ie C2H2 or H2O
   Returns:
       The molar mass of the compound in atomic mass units.


