The hamstrings primarily do flexion of the knee and hip extension. Semitendinosus and semimembranosus can also do internal rotation of the knee joint (when flexed). Biceps femoris can also do external rotation of the knee joint (when flexed).