Dear Pankaj Mishra,
You can do it during molecular dynamics using section
CP2K_INPUT / MOTION / CONSTRAINT / COLLECTIVE
and specifying it in
CP2K_INPUT / FORCE_EVAL / SUBSYS / COLVAR
During geometry optimisation ("GEO_OPT") it is not possible to constraint a bond exactly, but one can work with RESTRAIN and make the condition be _almost_ fulfilled.
The FIXED_ATOMS works only if the bond to be fixed is along one Cartesian axis and the specific coordinate along the direction of the bond can be fixed; this is usually not possible, but it depends on your system.
Greetings from Zurich,
apsi