The chromomagnetic operator on the lattice