In general Subparagraph (B) of section 199(c)(4) of the Internal Revenue Code of 1986 is amended by striking or at the end of clause (ii), by striking the period at the end of clause (iii) and inserting , or , and by adding at the end the following new clause: (iv) the mining of any hard mineral. . (b) Effective date The amendments made by this section shall apply to taxable years beginning after the date of the enactment of this Act. 515. Limitation on deduction for income attributable to domestic production of oil, natural gas, or primary products thereof (a) Denial of deduction Paragraph (4) of section 199(c) of the Internal Revenue Code of 1986 is amended by adding at the end the following new subparagraph: (E) Special rule for oil, natural gas, and coal income The term domestic production gross receipts shall not include gross receipts from the production, refining, processing, transportation, or distribution of oil, natural gas, or coal, or any primary product (within the meaning of subsection (d)(9)) thereof. . (b) Effective date The amendment made by this section shall apply to taxable years beginning after the date of the enactment of this Act. 516. Termination of last-in, first-out method of inventory for oil, natural gas, and coal companies (a) In general Section 472 of the Internal Revenue Code of 1986 is amended by adding at the end the following new subsection: (h) Termination for oil, natural gas, and coal companies Subsection (a) shall not apply to any taxpayer that is in the trade or business of the production, refining, processing, transportation, or distribution of oil, natural gas, or coal for any taxable year beginning after the date of enactment of this subsection. . (b) Additional termination Section 473 of the Internal Revenue Code of 1986 is amended by adding at the end the following new subsection: (h) Termination for oil, natural gas, and coal companies This section shall not apply to any taxpayer that is in the trade or business of the production, refining, processing, transportation,