Interplanar potential functions for calculating surface energies and cohesive stress