The function of GroEL involves binding to unfolded or misfolded proteins. When these proteins enter the barrel-shaped GroEL complex, they are enclosed by the GroES cap, forming a structure that allows the proteins to fold without interference from other cellular molecules. The process is ATP-dependent, meaning that ATP hydrolysis provides the energy required for the conformational changes in GroEL and GroES that facilitate protein folding.