def get_raw_pdb_filename_from_interim_filename(interim_filename, raw_pdb_dir):
    """Get raw pdb filename from interim filename."""
    pdb_name = interim_filename
    slash_tokens = pdb_name.split('/')
    slash_dot_tokens = slash_tokens[-1].split(".")
    raw_pdb_filename = raw_pdb_dir + '/' + slash_tokens[-2] + '/' + slash_dot_tokens[0] + '.' + slash_dot_tokens[1]
    return raw_pdb_filename