Hi Alice
Welcome to Hip Talk.
You are still early in your recovery. Sometimes if you do too much - your body really complains. Sounds like you did too much. We all heal at a different rate. If whatever you are doing is causing pain - then don't do it.
Two weeks is very early on to be pushing yourself. Relax, walk and take it easy. Everything will heal eventually. It takes a good year or more to get completely healed. 2 weeks post op is very early in the healing stages.
I had my big thigh muscle spasm on me. Marc the PT in Belgium said I should take magnesium for spasms. He also did a lot of massage to that area of my leg.
Icing, as Karen, suggested is also very good. Better if you take it easy and don't cause yourself any extra pain. Dr. De Smet always said take it easy, if it hurts - don't do it. You will heal and recover, just give it some time.
Good Luck.
Pat