'Try to guess if the file is a PDB file.
>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname(\'5e5z.pdb\')
>>> PDB().sniff(fname)
True
>>> fname = get_test_fname(\'drugbank_drugs.cml\')
>>> PDB().sniff(fname)
False'

def sniff(self, filename):

    headers = iter_headers(filename, sep='    ', count=300)
    h = t = c = s = k = e = False
    for line in headers:
        section_name = line[0].strip()
        if (section_name == 'HEADER'):
            h = True
        elif (section_name == 'TITLE'):
            t = True
        elif (section_name == 'COMPND'):
            c = True
        elif (section_name == 'SOURCE'):
            s = True
        elif (section_name == 'KEYWDS'):
            k = True
        elif (section_name == 'EXPDTA'):
            e = True
    if (((((h * t) * c) * s) * k) * e):
        return True
    else:
        return False
