def get_H_O_index_list(atoms):
    """Returns two lists with the indices of hydrogen and oxygen atoms.
    """
    H_list = O_list = []
    for index, atom in enumerate(atoms):
        if atom[0] == 'H':
            H_list.append(index)
        if atom[0] == 'O':
            O_list.append(index)
    return H_list, O_list