def molecular_type(name, bases=(str,)):
    """Define a new molecular type

    The optional argument bases (defaults to str) can be any python
    type or tuple of types.
    """
    if not isinstance(bases, tuple):
        bases = bases,
    return type(name, bases, {})
