How to measure a distance along the surface of a protein in a PDB
I would use linear distances between a suitable amount of fixed points as an approximation. You cannot measure exact distances along a rough surface, as the distance will vary depending on minimum measuring size. This is known as the coastline length paradox in math. https://en.wikipedia.org/wiki/Coastline_paradox

In theory the length would approach infinity as the measuring size approaches 0.

In practice you can get around the issue if you use a step size compatible with the smallest stable feature.

A suitable measuring size would probaly be in the order of ~10^-11 meters. (1/10 the size of an carbon atom).