Chemical principles underlying bioleaching of metals from ores and solid wastes, and bioaccumulation of metals from solutions