def get_site_headtail(site_file):
    """
    Get header and footer from site.txt file. Using specific "sites" and "CUBES" strings to parse everything
    but the receptor site data
    """
    s_file = open(site_file,'r')
        
    # read it all in
    site_text = s_file.read()

    # parse to save header and footer
    htag = site_text[0:site_text.find('SITES')].rfind('\n') # last newline before 'SITES'
    head = site_text[:htag+1]
    
    ttag = site_text[0:site_text.find('CUBES')].rfind('\n') # last newline before 'CUBES'
    tail = site_text[ttag+1:]
    
    s_file.close()
    
    return head,tail