def read_mol_dict(file):
    """
    Read dict of molecules from file.

    Returns
    -------
    molecules : :class:`dict` of :class:`dict`
        Dictionary of molecule definitions with `key` = name.

    """
    with open(file, 'r') as f:
        lines = f.readlines()

    molecules = {}
    for line in lines:
        molecule = {}
        name, method, smiles = line.rstrip().split(',')
        molecule['name'] = name
        molecule['method'] = method
        molecule['smiles'] = smiles
        molecule['file'] = f'{name}.mol'
        molecules[name] = molecule

    return molecules