While noble metals often occur as minor components in host minerals in various ore deposits, little theoretical assessment exists to predict the occurrence of these metals. Here, we probe the fundamental controls responsible for the occurrence of trace elements in host minerals through first-principles calculations. We apply the theoretical model to understanding the debated issues concerning the occurrence of gold (Au) in pyrite, in which the valence of Au is ascribed to either This is the peer-reviewed, final accepted version for American Mineralogist, published by the Mineralogical Society of America.The published version is subject to change. Cite as Authors (Year) Title. American Mineralogist, in press.