Boundary integral for the Ramachandran index