def mget(d, path):
    """Get from a dict using dot notation

    Parameters
    ----------
    d : dict
        Nested dictionary structure
    path : str
        Dot separated property, e.g. output.structure.lattice.volume

    Returns
    -------
    Object
        Value of the dictionary

    Examples
    --------
    >>> nested_dict = {'top_level': {'second_level': 'my_value'}}
    >>> mget(nested_dict, 'top_level.second_level')
    'my_value'

    """

    keys = path.split('.')
    current_path = ""
    curr_dict = d
    for k in keys:
        if not isinstance(curr_dict, dict):
            raise ValueError("Object at path \"{}\" (type: {}) is not a dictionary and \"{}\" in path \"{}\" cannot be looked up.".format(current_path[:-1], type(curr_dict), k, path))
        current_path += k
        try:
            curr_dict = curr_dict[k]
        except KeyError:
            raise KeyError("Cannot access key \"{}\" in path \"{}\". Possible keys are [{}].".format(k, current_path, ", ".join(curr_dict.keys())))

        current_path += "."
    return curr_dict