You shouldn't need to reproduce the atom fraction calculation.  You should probably use self.to_atom_frac() to get the atom frac dictionary.  See http://pynesim.org/pyapi/material.html#pyne.material.Material.to_atom_frac