An organism that uses energy to synthesize organic molecules from inorganic substances.