How do you make hamsters go from fighting to mating?

If the female hamster is not on heat they will not mate, so just separate them until they're ready.