Calculation of work of adhesion by pair potential suummation