The question and some valuable suggestions have been raised in an earlier post.
Earlier post
Geometry optimization with constrained DFT - #13 by jherbert
But I’m using Q-CHEM 5.4.1 and I haven’t finished any single CDFT-optimization(or CDFT-CI optimization) task successfully(optimization under normal DFT seems okay though), including example offered in the post above. Strange energy hoppings still exist in my case and increasing OPT_MAX_CYCLE seems to help little. My input/output files for the job are in this page.