Stress field in granular systems: loop forces and potential formulation.