Refined code
added displacement for protons