An organism (autotroph) that derives energy from chemicals in nonliving surroundings, such as using oxidation of inorganic compounds to generate energy. For example: oxidation of reduced sulfur compounds to sulfuric acid in Thiobacillus.