def readInventory(filename):
    """Function to read Serpent bumat files
    
    Parameter
    ---------
    filename : str
        path to the bumatfile to be read
    
    Returns
    -------
    inventory : dict
        dictionary to store the inventory. keys are ZAID identifiers (str), values
        are atom densities (str) in b^{-1}cm^{-1}
    """
    
    mat=open(filename)
    matfile=mat.readlines()
    mat.close()
    inventory={}
    for line in matfile[6:]:
        x=line.strip().split()
        inventory[x[0][:-4]]=x[1]
    return inventory