# Path: molmod/constants.py



from molmod.constants import avogadro

def parse_unit(expression):
    """Evaluate a python expression string containing constants

       Argument:
        | ``expression``  --  A string containing a numerical expressions
                              including unit conversions.

       In addition to the variables in this module, also the following
       shorthands are supported:

    """
    try:
        g = globals()
        g.update(shorthands)
        return float(eval(str(expression), g))
    except:
        raise ValueError("Could not interpret '%s' as a unit or a measure." % expression)


# *** Generic ***
au = 1.0


# *** Charge ***

coulomb = 1.0/1.602176462e-19

# Mol


# Path: molmod/constants.py



# Path: molmod/units.py
from molmod.constants import avogadro


def parse_unit(expression):
    """Evaluate a python expression string containing constants

       Argument:
        | ``expression``  --  A string containing a numerical expressions
                              including unit conversions.

       In addition to the variables in this module, also the following
       shorthands are supported:

    """
    try:
        g = globals()
        g.update(shorthands)
        return float(eval(str(expression), g))
    except:
        raise ValueError("Could not interpret '%s' as a unit or a measure." % expression)


# *** Generic ***
au = 1.0


# *** Charge ***

coulomb = 1.0/1.602176462e-19

# Mol


mol = avogadro