ate gradient minimization, keeping all atoms of the co