The following example shows how to SHAKE all bond lengths between hydrogens and heavy atoms, and the geometry of all TIP3 water molecules.
shake reference=parameters molecule ( resname TIP3 ) reference=coordinates bonds ( hydrogen and not resname TIP3 ) ( all ) tolerance=1.0e-06 mxiterations=500 end