how to obtain the adhesion energy of A/B interface?

Perhaps compute group/group? See http://lammps.sandia.gov/doc/compute_group_group.html

Stan